ContentList::model PHP Method

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : ContentList
return ContentList the static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

        
      <iframe id='contentlist_iframe'  src="<?php 
echo Yii::app()->request->baseUrl;
?>
/contentlist/create/embed/iframe" frameborder="0" onLoad="autoResize(this);" height="30px" width="100%"></iframe>
</div>           
<script type="text/javascript">
     <?php 
if (is_array($block_model->content_list) && !empty($block_model->content_list)) {
    ?>
               
            
             <?php 
    $content_items = array();
    foreach ($block_model->content_list as $obj_id) {
        $temp_object = ContentList::model()->findByPk($obj_id);
        if ($temp_object) {
            $content_items['item_' . $temp_object->content_list_id]['id'] = $temp_object->content_list_id;
            $content_items['item_' . $temp_object->content_list_id]['title'] = $temp_object->name;
        }
    }
    echo 'var manual_content_list = ' . json_encode($content_items) . ';';
    ?>
                    $.each(manual_content_list, function(k,v) {                        
                             addContentList(v.title,v.id);              
                    }); 
                           
     <?php 
}
?>
         
All Usage Examples Of ContentList::model