Esempio n. 1
0
 protected function _beforeSave()
 {
     if (!$this->getAlias() && $this->getName()) {
         $this->setAlias(\Flywheel\Util\Slugify::filter($this->getName()));
     }
     return parent::_beforeSave();
     // TODO: Change the autogenerated stub
 }
Esempio n. 2
0
 /**
  * Overwrite
  * @return \Flywheel\Event\Event
  */
 protected function _beforeSave()
 {
     if ($this->getName()) {
         $this->setSlug(\Flywheel\Util\Slugify::filter($this->getName()));
     }
     if (!$this->getPublicTime() instanceof DateTime || $this->getPublicTime()->isEmpty()) {
         $this->setPublicTime(new DateTime());
     }
     if (!empty($this->_images)) {
         $this->setImgs(json_encode($this->_images));
     }
     return parent::_beforeSave();
 }
Esempio n. 3
0
 /** OVERWRITE METHOD */
 protected function _beforeSave()
 {
     $this->setSlug(Slugify::filter($this->getName()));
     parent::_beforeSave();
 }
Esempio n. 4
0
 /**
  * Overwrite
  * @return \Flywheel\Event\Event
  */
 protected function _beforeSave()
 {
     if (!$this->getSlug() && $this->getTitle()) {
         $this->setSlug(\Flywheel\Util\Slugify::filter($this->getTitle()));
     }
     return parent::_beforeSave();
 }