Esempio n. 1
0
 /**
  * prepareRecord
  *
  * @param Record $record
  *
  * @return  void
  */
 protected function prepareRecord(Record $record)
 {
     /** @var NestedRecord $record */
     parent::prepareRecord($record);
     // Auto set location for batch copy
     $key = $record->getKeyName();
     if (!$record->{$key} && !TestHelper::getValue($record, 'locationId')) {
         $record->setLocation($record->parent_id, $record::LOCATION_LAST_CHILD);
     }
 }
Esempio n. 2
0
 /**
  * getDefaultData
  *
  * @return array
  */
 public function getFormDefaultData()
 {
     $item = parent::getFormDefaultData();
     unset($item['password']);
     unset($item['password2']);
     return $item;
 }
Esempio n. 3
0
 /**
  * Method to set new item ordering as first or last.
  *
  * @param   Record $record   Item table to save.
  * @param   string $position `first` or other are `last`.
  *
  * @return  void
  */
 public function setOrderPosition(Record $record, $position = self::ORDER_POSITION_LAST)
 {
     parent::setOrderPosition($record, $position);
 }
 /**
  * doExecute
  *
  * @return mixed
  * @throws \Exception
  */
 protected function doExecute()
 {
     $this->model['order.column'] = $this->orderField;
     $this->model->reorder((array) $this->data);
     return true;
 }