Object::convertObjectType PHP Method

convertObjectType() public static method

Convert from value to the String of the Object Type
public static convertObjectType ( type $value )
$value type
    public static function convertObjectType($value)
    {
        $types = GxcHelpers::getAvailableContentType();
        if (isset($types[$value]['name'])) {
            return $types[$value]['name'];
        } else {
            return t('undefined');
        }
    }

Usage Example

Ejemplo n.º 1
0
<?php

$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'taxonomy_id', 'type' => 'raw', 'value' => $model->taxonomy_id), array('name' => 'name', 'type' => 'raw', 'value' => CHtml::link($model->name, array("update", "id" => $model->taxonomy_id))), array('name' => 'type', 'type' => 'raw', 'value' => Object::convertObjectType($model->type)), 'description', array('name' => 'lang', 'type' => 'raw', 'value' => Language::convertLanguage($model->lang)))));
All Usage Examples Of Object::convertObjectType