/** * Preprocess value for Discount column * * @param mixed $value Value * @param array $column Column data * @param \XLite\Model\Role $role Entity * * @return string */ protected function preprocessName($value, array $column, \XLite\Model\Role $role) { return $value ?: $role->getPublicName(); }
/** * Check - specified permission is allowed or not * * @param string $code Permission code * * @return boolean */ public function isPermissionAllowed($code) { return $this->getEnabled() && parent::isPermissionAllowed($code); }
/** * {@inheritDoc} */ public function prepareEntityBeforeCommit($type) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'prepareEntityBeforeCommit', array($type)); return parent::prepareEntityBeforeCommit($type); }