Showing 321-340 of 373 items.

Single table inheritance

Created 15 years ago by samdark samdark, updated 15 years ago by samdark samdark. 8 comments

Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field...

34 0
35
Viewed: 57 906 times
Version: 1.1
Category: How-tos

Converting an Artisteer Theme to Yii

Created 15 years ago by bglee bglee, updated 15 years ago by bglee bglee. 3 comments

There are two approaches to converting an Artisteer theme. The first is to simply copy an existing Artisteer – based Yii theme, overlay the CSS and images, then make any necessary tweaks to the layout files. This is undoubtedly the fastest route, but won't teach you as much as doing it from scratch. That's ok. Sometimes getting the job done is the top priority. The second approach is more gen...

6 0
12
Viewed: 32 685 times
Version: 1.1
Category: How-tos

Configuring controller access rules to default-deny

Created 15 years ago by Steve Friedl Steve Friedl, updated 12 years ago by nsanden nsanden. 3 comments

Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

class CommentController extends CController {
    public function filters()
    {
        return array( 'accessControl' ); // perform access control for CRUD operations
    }

11 0
12
Viewed: 145 564 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

Created 15 years ago by PinkBrainPlan PinkBrainPlan, updated 15 years ago by PinkBrainPlan PinkBrainPlan. 2 comments

<?php $this->widget('zii.widgets.grid.CGridView', array(

'dataProvider' => $dataprovider,
'id'=>'recipient_table',
    'selectionChanged'=>'updateEditForm',
'columns' => array(
	'rec_id',
            'org.nachname',
            'org.vorname',
            'org_id',
            array(
                'class'=>'CButtonColumn',
                'template'=>'{...
1 0
10
Viewed: 31 138 times
Version: 1.1
Category: How-tos