protected function _beforeSave() { if (!$this->getAlias() && $this->getName()) { $this->setAlias(\Flywheel\Util\Slugify::filter($this->getName())); } return parent::_beforeSave(); // TODO: Change the autogenerated stub }
/** * 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(); }
/** OVERWRITE METHOD */ protected function _beforeSave() { $this->setSlug(Slugify::filter($this->getName())); parent::_beforeSave(); }
/** * Overwrite * @return \Flywheel\Event\Event */ protected function _beforeSave() { if (!$this->getSlug() && $this->getTitle()) { $this->setSlug(\Flywheel\Util\Slugify::filter($this->getTitle())); } return parent::_beforeSave(); }