コード例 #1
0
ファイル: Module.php プロジェクト: zorn-v/thelia
 /**
  * @param    Hook $hook The hook object to add.
  */
 protected function doAddHook($hook)
 {
     $ignoredModuleHook = new ChildIgnoredModuleHook();
     $ignoredModuleHook->setHook($hook);
     $this->addIgnoredModuleHook($ignoredModuleHook);
     // set the back reference to this object directly as using provided method either results
     // in endless loop or in multiple relations
     if (!$hook->getModules()->contains($this)) {
         $foreignCollection = $hook->getModules();
         $foreignCollection[] = $this;
     }
 }