/** * Resolves the fields to display in a Form. * * @return String[] The names of the fields to display. */ private function resolveVisibleFields() { $result = []; $columns = $this->model->getColumns(); foreach ($columns as $column) { $result[] = $column->getName(); } return $result; }
/** * Finds and defines one-to-one and one-to-many relations for given model. * * @param $model Model the Model to find the relations for. */ private function findSimpleRelations(Model $model) { //$this->app['log']->debug(sprintf('Finding relations for %s', $model->getName())); foreach ($model->getColumns() as $column) { if (ends_with($column->getName(), self::ID_SUFFIX)) { $this->defineRelation($model, $column->getName()); } } }