Ejemplo n.º 1
0
 /**
  * Check if the simple class is used for widget displaying
  *
  * @param array                $column Column
  * @param \XLite\Model\AEntity $entity Entity
  *
  * @return boolean
  */
 protected function isClassColumnVisible(array $column, \XLite\Model\AEntity $entity)
 {
     // Right now admin cannot directly edit serviceName values for additional fields
     // and cannot change "Not required" state of "custom_state" field
     // TODO: refactor it
     return 'serviceName' !== $column[static::COLUMN_CODE] ? 'custom_state' === $entity->getServiceName() && 'required' === $column[static::COLUMN_CODE] ? false : parent::isClassColumnVisible($column, $entity) : $entity->getAdditional();
 }