public function execute($request) { $this->resource = $this->getRoute()->resource; // Check that this isn't the root if (!isset($this->resource->parent)) { $this->forward404(); } // Check user authorization if (!QubitAcl::check($this->resource, 'read')) { QubitAcl::forwardUnauthorized(); } $criteria = new Criteria(); $criteria->add(QubitRelation::OBJECT_ID, $this->resource->id); $criteria->addJoin(QubitRelation::SUBJECT_ID, QubitFunction::ID); $this->functions = QubitFunction::get($criteria); }
public static function getfunctionsRelatedByparentIdById($id, array $options = array()) { $criteria = new Criteria(); self::addfunctionsRelatedByparentIdCriteriaById($criteria, $id); return QubitFunction::get($criteria, $options); }