/** * Render string model column type * * @param \Engine\Crud\Grid\Column $column * @return string */ public static function _string(Column $column) { $columnCode = []; $columnCode[] = "text: '" . $column->getTitle() . "'"; $columnCode[] = "dataIndex: '" . $column->getKey() . "'"; $columnCode[] = "width: " . $column->getWidth(); if ($column->isSortable()) { $columnCode[] = "sortable: true"; } if ($column->isHidden()) { $columnCode[] = "hidden: true"; } if ($column->isEditable()) { $columnCode[] = "field: 'textfield'"; } return forward_static_call(['static', '_implode'], $columnCode); }
/** * Render string model column type * * @param \Engine\Crud\Grid\Column $column * @return string */ public static function _string(Column $column) { $field = $column->getKey(); $columnCode = "\n {\n name: '" . $field . "',\n type: 'string'\n }"; return $columnCode; }