Example #1
0
 /**
  * @param Taxonomy $taxonomy
  * @param string   $name
  * @param string   $slug
  */
 public function __construct(Taxonomy $taxonomy, $name, $slug)
 {
     $this->contentItems = new ArrayCollection();
     $this->setName($name);
     $this->setSlug($slug);
     $this->key = $this->createKey($taxonomy);
     $this->taxonomy = $taxonomy;
     $this->taxonomy->addTerm($this);
 }
 /**
  * {@inheritDoc}
  */
 public function addTerm(\Skimpy\CMS\Term $term)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'addTerm', [$term]);
     return parent::addTerm($term);
 }