Esempio n. 1
0
 /**
  * @param $row
  * @param Table $table
  * @return bool|string
  */
 public function getValue($row, Table $table)
 {
     if (!$this->value) {
         $value = $row->{$this->name};
         if (!$value) {
             return $this->noValueDisplay;
         }
         return date($this->format, is_numeric($value) ? $value : strtotime($value));
     }
     return parent::getValue($row, $table);
 }
Esempio n. 2
0
 public function init($config)
 {
     foreach ($this->buttons as $name => $details) {
         $class = isset($details['class']) ? $details['class'] : 'Basic';
         if (false === strpos($class, '\\')) {
             $class = '\\mpf\\widgets\\datatable\\columns\\actions\\' . $class;
         }
         $details['name'] = $name;
         unset($details['class']);
         $this->instancedButtons[$name] = new $class($details);
     }
     foreach ($this->topButtons as $name => $details) {
         $class = isset($details['class']) ? $details['class'] : 'Basic';
         if (false === strpos($class, '\\')) {
             $class = '\\mpf\\widgets\\datatable\\columns\\actions\\' . $class;
         }
         $details['name'] = $name;
         unset($details['class']);
         $this->instancedTopButtons[$name] = new $class($details);
     }
     return parent::init($config);
 }
Esempio n. 3
0
 public function init($config)
 {
     if (!isset($this->htmlOptions['class'])) {
         $this->htmlOptions['class'] = 'inline-edit-column';
     } else {
         $this->htmlOptions['class'] .= ' inline-edit-column';
     }
     parent::init($config);
 }