Taxonomy::getTaxonomy PHP Method

getTaxonomy() public static method

public static getTaxonomy ( )
    public static function getTaxonomy()
    {
        $taxonomy = Taxonomy::model()->with('language')->findAll();
        $data = array(0 => t("None"));
        if ($taxonomy && count($taxonomy) > 0) {
            foreach ($taxonomy as $t) {
                $data[$t->taxonomy_id] = $t->name . ' - ' . $t->language->lang_desc;
            }
        }
        return $data;
    }

Usage Example

Exemplo n.º 1
0
        <div class="controls">
                <?php 
$this->widget('ext.elFinder.ServerFileInput', array('model' => $model, 'attribute' => 'image', 'connectorRoute' => 'sysadmin/elfinder/connector'));
?>
                </div>
            </div>

    
    <?php 
echo $form->textFieldRow($model, 'order', array('class' => 'span5'));
?>

    <?php 
echo $form->dropDownListRow($model, 'parent', Category::getCategories(), array('class' => 'span3'));
?>
    
    <?php 
echo $form->dropDownListRow($model, 'taxonomy_id', Taxonomy::getTaxonomy(), array('class' => 'span3'));
?>

    <?php 
echo $form->dropDownListRow($model, 'state', array(1 => 'Publish', 0 => 'UnPublish'));
?>

</fieldset>
<?php 
$this->endWidget();
$this->widget('ext.TiiSlug.TiiSlug', array('model' => $model, 'source' => 'title', 'target' => 'slug'));
?>

All Usage Examples Of Taxonomy::getTaxonomy