public function getRepeatable()
{
// Should I support checked-out elements?
$checkoutSupport = false;
if (isset($this->element['checkout'])) {
$checkoutSupportValue = (string) $this->element['checkout'];
$checkoutSupport = in_array(strtolower($checkoutSupportValue), array('yes', 'true', 'on', 1));
}
if (!$this->item instanceof DataModel) {
throw new DataModelRequired(__CLASS__);
}
// Is this record checked out?
$userId = $this->form->getContainer()->platform->getUser()->get('id', 0);
$checked_out = false;
if ($checkoutSupport) {
$checked_out = $this->item->isLocked($userId);
}
// Get the key id for this record
$key_field = $this->item->getKeyName();
$key_id = $this->item->{$key_field};
// Get the HTML
return JHtml::_('grid.id', $this->rowid, $key_id, $checked_out);
}