WIP: (feat): Boost Campaigns module
0/2 discussions resolved
added 1 commit
- ad87348f - (proto): Create campaign normalization and validation
37 if ($limit > 50 || $limit < 0) { 38 $limit = 12; 39 } 40 41 $guid = ''; 42 43 if ($urn) { 44 $limit = 1; 45 $offset = ''; 46 47 $urn = new Urn($urn); 48 $guid = (string) $urn->getNss(); 49 } 50 51 /** @var Repository $repository */ 52 $repository = Di::_()->get('Boost\Campaigns\Repository'); - Owner
Should always be manager
64 ]); 65 } 66 67 /** 68 * Equivalent to HTTP POST method 69 * @param array $pages 70 * @return mixed|null 71 */ 72 public function post($pages) 73 { 74 $campaign = new Campaign(); 75 76 $campaign 77 ->setName(trim($_POST['name'] ?? '')) 78 ->setType($_POST['type'] ?? '') 79 ->setEntityUrns($_POST['entity_urns'] ?? null) - Owner
Can we assume formatting being sent? Json object vs comma vs array?