Example #1
0
 /**
  * State button.
  *
  * @param string $taskPrefix The task prefix.
  *
  * @return string State button html code.
  */
 public function state($taskPrefix = null)
 {
     $item = $this->current;
     $canChange = $this->state->get('access.canChange', true);
     $taskPrefix = $taskPrefix ?: $this->config->get('view_list') . '.state.';
     $field = $this->config->get('field.state', 'state');
     return \JHtmlJGrid::published($item->{$field}, $this->row, $taskPrefix, $canChange, 'cb', $item->publish_up, $item->publish_down);
 }