public function load($crudClass) { $this->crudClass = Vector::getLastSplited($crudClass, "\\"); $this->computedMenus = MenuBuilder::getInstance()->get(); $this->loadPageTitle(); $this->loadPageBreadcrumbs(); $this->loadRoutes(); }
/** * Return all merge attributes to update fields * * @param string $column * @param array $formCustomFields * @param array $rowData * @return \Illuminate\Support\Collection */ protected function getUpdateAttributes($column, $formCustomFields, $rowData) { $collection = collect(array_merge(Vector::findOrEmptyArray($formCustomFields, $column), Vector::findOrEmptyArray($rowData, $column))); return $collection->merge($collection->get("update", [])); }
/** * Return the list of options * * @return array */ private function getOptions() { $this->selectedValue = $this->selectedValue ?: $this->getValue(); if (!empty($this->table)) { return $this->getTableOptions(); } if (!Vector::isAssociative($this->options)) { $this->options = Vector::toAssociative($this->options); } $options = collect(); foreach ($this->options as $optionValue => $optionText) { $options->push($this->createOption($optionValue, $optionText)); } return $options->toArray(); }
public static function build($columnName, $overrides, $defaultProperties) { $field = Factory::createField($columnName, Vector::findOrEmpty($overrides, 'type')); return collect(['align' => 'left', 'label' => String::labelize($columnName), 'width' => null, 'order' => $defaultProperties['order'], 'filter' => $defaultProperties['filter'], 'name' => $columnName])->merge($overrides)->merge(['type' => $field])->toArray(); }