Esempio n. 1
0
 /**
  * AbstractNestedSetModel constructor.
  * @param EventDispatcherInterface $eventDispatcher
  * @param DataProcessor $dataProcessor
  * @param AbstractRepository $repository
  * @param Insert $insertOperation
  * @param Edit $editOperation
  * @param Delete $deleteOperation
  */
 public function __construct(EventDispatcherInterface $eventDispatcher, DataProcessor $dataProcessor, AbstractRepository $repository, Insert $insertOperation, Edit $editOperation, Delete $deleteOperation)
 {
     parent::__construct($eventDispatcher, $dataProcessor, $repository);
     $this->insertOperation = $insertOperation;
     $this->editOperation = $editOperation;
     $this->deleteOperation = $deleteOperation;
 }
Esempio n. 2
0
 /**
  * @inheritdoc
  */
 public function save(array $data, $entryId = null)
 {
     if (isset($data['module'])) {
         $data['module_id'] = $data['module'];
     }
     return parent::save($data, $entryId);
 }
Esempio n. 3
0
 /**
  * @inheritdoc
  */
 public function save(array $data, $entryId = null)
 {
     $data = array_merge($data, ['category_id' => (int) $data['cat'], 'updated_at' => 'now']);
     if (!empty($data['filesize'])) {
         $data['size'] = $data['filesize'];
     }
     return parent::save($data, $entryId);
 }
Esempio n. 4
0
 /**
  * @inheritdoc
  */
 public function save(array $data, $entryId = null)
 {
     if ($entryId === null) {
         $settings = $this->config->getSettings(Schema::MODULE_NAME);
         $data['html'] = $settings['html'];
         $data['status'] = 0;
     }
     $data['updated_at'] = 'now';
     return parent::save($data, $entryId);
 }
Esempio n. 5
0
 /**
  * @inheritdoc
  */
 public function save(array $data, $entryId = null)
 {
     $settings = $this->config->getSettings(Schema::MODULE_NAME);
     $data = array_merge($data, ['comments' => $settings['comments'] == 1 ? isset($data['comments']) && $data['comments'] == 1 ? 1 : 0 : $settings['comments']]);
     if ($entryId === null) {
         $picNum = $this->repository->getLastPictureByGalleryId($entryId);
         $data['pic'] = !is_null($picNum) ? $picNum + 1 : 1;
     }
     return parent::save($data, $entryId);
 }
Esempio n. 6
0
 /**
  * @inheritdoc
  */
 public function save(array $rawData, $entryId = null)
 {
     $rawData['updated_at'] = 'now';
     return parent::save($rawData, $entryId);
 }
Esempio n. 7
0
 /**
  * @inheritdoc
  */
 public function save(array $data, $entryId = null)
 {
     $data = array_merge($data, ['page' => $data['resource'], 'privilege_id' => $data['privileges']]);
     return parent::save($data, $entryId);
 }
Esempio n. 8
0
 /**
  * @inheritdoc
  */
 public function save(array $data, $newsId = null)
 {
     $settings = $this->config->getSettings(Schema::MODULE_NAME);
     $data = array_merge($data, ['updated_at' => 'now', 'readmore' => $this->useReadMore($data, $settings), 'comments' => $this->useComments($data, $settings), 'category_id' => $data['cat']]);
     return parent::save($data, $newsId);
 }
Esempio n. 9
0
 /**
  * @inheritdoc
  */
 public function save(array $data, $entryId = null)
 {
     $data = array_merge($data, ['keywords' => $data['seo_keywords'], 'description' => $data['seo_description'], 'robots' => $data['seo_robots']]);
     return parent::save($data, $entryId);
 }