*/ namespace oat\taoOutcomeUi\model\table; /** * Represents a delivery executions columns * * @access public */ class DeliveryExecutionColumn extends \tao_models_classes_table_Column { private static $dataProvider; private $identifier; public function __construct($label, $identifier) { parent::__construct($label); $this->identifier = $identifier; } /** * @param $array * @return DeliveryExecutionColumn|\tao_models_classes_table_Column * @throws \common_exception_Error */ protected static function fromArray($array) { if (!array_key_exists('label', $array) || !array_key_exists('variableIdentifier', $array)) { throw new \common_exception_Error('Incorrect data description'); } return new self($array['label'], $array['variableIdentifier']); } /** * @return string */ public function getIdentifier() { return $this->identifier; } public function getContextIdentifier() { return 'delivery_execution'; } public function getDataProvider() { if (!self::$dataProvider) { self::$dataProvider = new DeliveryExecutionDataProvider(); } return self::$dataProvider; } public function toArray() { $res = parent::toArray(); $res['variableIdentifier'] = $this->getIdentifier(); return $res; } }