public function __construct(NewsletterEntity $newsletter) { $this->newsletter = $newsletter; $this->dir = new DirEntity(); $this->dir->setParent($this->newsletter->route->getDir()); $this->dir->setInvisible(TRUE); $this->dir->setName(Strings::webalize(get_class($this)) . Strings::random()); }
/** * @param AccountEntity $supplier */ public function setSupplier(AccountEntity $supplier) { if ($this->supplier !== $supplier) { $this->dir->setParent($supplier->getDir()); } $this->supplier = $supplier; }
/** * @return DirEntity */ public function getDir() { if (!$this->dir) { $this->dir = new DirEntity(); $this->dir->setParent($this->page->getDir()); $this->dir->setInvisible(TRUE); $this->dir->setName(Strings::webalize(get_class($this)) . Strings::random()); } return $this->dir; }