FOF30\Form\Field\SelectRow::getRepeatable PHP Метод

getRepeatable() публичный Метод

Get the rendering of this field type for a repeatable (grid) display, e.g. in a view listing many item (typically a "browse" task)
С версии: 2.0
public getRepeatable ( ) : string
Результат string The field HTML
    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);
    }