public function setSortable($sortable = TRUE) { if ($this->getItemsDetail()) { throw new DataGridException('You can not use both sortable datagrid and items detail.'); } $this->sortable = (bool) $sortable; return $this; }