/**
  * Fetch Organisatie which references this Hulpverleners. Will return null in case reference is invalid.
  * `hulpverleners`.`organisatie` -> `organisatie`.`id`
  *
  * @param PDO $db a PDO Database instance
  * @param array $sort array of DSC instances
  * @return Organisatie
  */
 public function fetchOrganisatie(PDO $db, $sort = null)
 {
     $filter = array(Organisatie::FIELD_ID => $this->getOrganisatie());
     $result = Organisatie::findByFilter($db, $filter, true, $sort);
     return empty($result) ? null : $result[0];
 }
Example #2
0
 public static function getOrganisations()
 {
     if (self::$organisations === null) {
         self::$db = ECPFactory::getPDO("organisatie");
         $org = new Organisatie();
         $org->setActief(1);
         self::$organisations = Organisatie::findByExample(self::$db, $org);
     }
     return self::$organisations;
 }
Example #3
0
 /**
  * Fetch Organisatie's which this Persoon references.
  * `persoon`.`id` -> `organisatie`.`id`
  *
  * @param PDO $db a PDO Database instance
  * @param array $sort array of DSC instances
  * @return Organisatie[]
  */
 public function fetchOrganisatieCollection(PDO $db, $sort = null)
 {
     $filter = array(Organisatie::FIELD_ID => $this->getId());
     return Organisatie::findByFilter($db, $filter, true, $sort);
 }
 /**
  * get single Organisatie instance from a DOMElement
  *
  * @param DOMElement $node
  * @return Organisatie
  */
 public static function fromDOMElement(DOMElement $node)
 {
     $o = new Organisatie();
     $o->assignByHash(self::domNodeToHash($node, self::$FIELD_NAMES, self::$DEFAULT_VALUES, self::$FIELD_TYPES));
     $o->notifyPristine();
     return $o;
 }