/** * 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); } }
/** * getDefaultData * * @return array */ public function getFormDefaultData() { $item = parent::getFormDefaultData(); unset($item['password']); unset($item['password2']); return $item; }
/** * 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; }