コード例 #1
0
ファイル: JoinOne.php プロジェクト: tashik/phalcon_core
 /**
  * Constructor
  * 
  * @param string $title
  * @param string|array $path
  * @param string $column
  * @param array $columns
  * @param bool $hidden
  * @param int $width
  */
 public function __construct($title, $path, $column = null, $columns = null, $isSortable = true, $isHidden = false, $width = 200, $extraOptions = [], $isEditable = true, $fieldKey = null)
 {
     parent::__construct($title, $column, [], $isSortable, $isHidden, $width, $isEditable, $fieldKey);
     $this->_path = $path;
     $this->_column = $column;
     $this->_columns = $columns;
     $this->_extraOptions = $extraOptions;
 }
コード例 #2
0
ファイル: Status.php プロジェクト: tashik/phalcon_core
 /**
  * Constructor
  *
  * @param string $title
  * @param string $name
  * @param array $options
  * @param bool $isSortable
  * @param bool $isHidden
  * @param int $width
  * @param string $fieldKey
  */
 public function __construct($title, $name = null, array $options = [], $isSortable = true, $isHidden = false, $width = 200, $isEditable = true, $fieldKey = null)
 {
     parent::__construct($title, $name, $options, $isSortable, $isHidden, $width, $isEditable, $fieldKey);
 }
コード例 #3
0
ファイル: Columns.php プロジェクト: tashik/phalcon_core
 /**
  * Render collection column type
  *
  * @param \Engine\Crud\Grid\Column $column
  * @return string
  */
 public static function _collection(Column\Collection $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()) {
         $field = $column->getField();
         $options = \Engine\Tools\Arrays::assocToArray($field->getOptions());
         $columnCode[] = "field: {\n                    xtype: 'combobox',\n                    typeAhead: true,\n                    triggerAction: 'all',\n                    selectOnTab: true,\n                    store: " . json_encode($options) . ",\n                    lazyRender: true,\n                    listClass: 'x-combo-list-small'\n                }";
     }
     return forward_static_call(['static', '_implode'], $columnCode);
 }