/**
  * Constructs a new data format table
  * @param zibo\library\orm\definition\ModelTable $table Table containing the data formats
  * @param string $formatAction URL to the action for the format
  * @return null
  */
 public function __construct(ModelTable $table, $formatAction = null)
 {
     $formats = $table->getDataFormats();
     parent::__construct($formats);
     $this->setId(self::STYLE_ID);
     $this->addDecorator(new ZebraDecorator(new DataFormatDecorator($formatAction)));
 }
예제 #2
0
 /**
  * Constructs a new log change table
  * @param array $changes
  */
 public function __construct(array $changes)
 {
     parent::__construct($changes);
     $translator = I18n::getInstance()->getTranslator();
     $this->addDecorator(new ZebraDecorator(new LogValueDecorator('fieldName')), new StaticDecorator($translator->translate('orm.label.field')));
     $this->addDecorator(new LogValueDecorator('oldValue'), new StaticDecorator($translator->translate('orm.label.value.old')));
     $this->addDecorator(new LogValueDecorator('newValue'), new StaticDecorator($translator->translate('orm.label.value.new')));
 }
 /**
  * Constructs a new model field table
  * @param zibo\library\orm\definition\ModelTable $table Table containing the fields
  * @param string $fieldAction URL to the action for the field
  * @return null
  */
 public function __construct(ModelTable $table, $fieldAction = null)
 {
     $fields = $table->getFields();
     unset($fields[ModelTable::PRIMARY_KEY]);
     parent::__construct($fields);
     $this->setId(self::STYLE_ID);
     $this->addDecorator(new ZebraDecorator(new ModelFieldDecorator($fieldAction)));
     $this->addDecorator(new ModelFieldLabelDecorator());
 }
 /**
  * Constructs a new model index table
  * @param zibo\library\orm\definition\ModelTable $table Table containing the indexes
  * @param string $indexAction URL to the action for the index
  * @return null
  */
 public function __construct(ModelTable $table, $indexAction = null)
 {
     $indexes = $table->getIndexes();
     if (!$indexes) {
         $indexes = array();
     }
     parent::__construct($indexes);
     $this->setId(self::STYLE_ID);
     $this->addDecorator(new ZebraDecorator(new IndexDecorator($indexAction)));
 }
예제 #5
0
 /**
  * Constructs a new exportable table
  * @param array $values Array with the values for the table, values are passed to the decorators to populate the rows of the table
  * @return null
  */
 public function __construct(array $values)
 {
     parent::__construct($values);
     $this->exportColumnDecorators = array();
     $this->exportGroupDecorators = array();
 }