/** * * @return \Floxim\Floxim\System\Collection */ public function getChain() { if (is_null($this->chain)) { $parent_id = $this['parent_id']; if ($parent_id) { $parent = fx::getComponentById($parent_id); $parent_chain = $parent->getChain()->copy(); $parent_chain[] = $this; $this->chain = $parent_chain; } else { $this->chain = fx::collection(array($this)); } } return $this->chain; }
/** * Get entity component * @return \Floxim\Floxim\Component\Component\Entity */ public function getComponent() { $component = fx::getComponentById($this->component_id); return $component; }