Esempio n. 1
0
 public function __construct()
 {
     // Get contact points
     $creator = Flight::get('creator');
     $contactPoints = $creator->fetch()->contactPoints;
     $orQueryAry = array();
     if ($contactPoints) {
         foreach ($contactPoints as $point) {
             $q = ListItem::query();
             $q->equalTo('objectId', $point->getObjectId());
             $orQueryAry[] = $q;
         }
         $orQuery = ParseQuery::orQueries($orQueryAry);
         $orQuery->includeKey('itemType');
         $contactList = $orQuery->find();
         foreach ($contactList as $c) {
             $contact[$c->itemType->value]['name'] = $c->itemType->value;
             $contact[$c->itemType->value]['link'] = Creator::contactPointLink($c);
         }
     }
     $this->contact = $contact;
 }