/** * Check-out button. * * @param string $taskPrefix The task prefix. * * @return string Check-out button html code. */ public function checkoutButton($taskPrefix = null) { $item = $this->current; $field = $this->config->get('field.checked_out', 'checked_out'); $authorNameField = $this->config->get('field.author_name'); $chkTimeField = $this->config->get('field.checked_out_time'); $canCheckin = $this->state->get('access.canCheckin', true); $taskPrefix = $taskPrefix ?: $this->config->get('view_list') . '.check.'; if (!$item->{$field}) { return ''; } return \JHtmlJGrid::checkedout($this->row, $item->{$authorNameField}, $item->{$chkTimeField}, $taskPrefix, $canCheckin); }