Exemplo n.º 1
0
 /**
  * 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();
 }
Exemplo n.º 2
0
 /**
  * Check - specified permission is allowed or not
  *
  * @param string $code Permission code
  *
  * @return boolean
  */
 public function isPermissionAllowed($code)
 {
     return $this->getEnabled() && parent::isPermissionAllowed($code);
 }
Exemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 public function prepareEntityBeforeCommit($type)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'prepareEntityBeforeCommit', array($type));
     return parent::prepareEntityBeforeCommit($type);
 }