Select Model

class Nos\Renderer_Select_Model
Extends Nos\Renderer.
This renderer is used to display a select tag fill with items from a model.
This renderer manage automatically behaviours Twinnable and Twinnable
The select is refresh automatically if an item of the model ise created, saved or deleted.

Configuration

property Nos\Renderer_Select_Model::$model

The name of the model

property Nos\Renderer_Select_Model::$multiple

Set to true if you want to select multiple items. Default false.

property Nos\Renderer_Select_Model::$empty_option

Set to true if you want an empty option in select. Default true.

property Nos\Renderer_Select_Model::$choose_label

The label of the empty option. Default empty.

Example

Adding a select model on page in a CRUD form configuration:

<?php

return array(
    'label' => __('Location:'),
    'renderer' => 'Nos\Renderer_Select_Model',
    'renderer_options' => array(
        'model' => 'Nos\Page\Model_Page',
    ),
);
Read the Docs v: elche
Versions
latest
stable
elche
dubrovka
chiba.2
chiba.1
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.