AliasController.php 1.24 KB
<?php
/**
 * Alias action handler
 */
 
class AliasController extends WRestController
{
    protected $_modelName = "alias";
    
    public function actions() //determine which of the standard actions will support the controller
    {
        return array(
            'list' => array( //use for get list of objects
                'class' => 'WRestListAction',
                'filterBy' => array(
                    'compare' => array(
                        'column' => array(
                            'alias' => 'query',
                            'recipient' => 'query',
                            'comment' => 'query'
                        ),
                        'partial' => true,
                        'operator' => 'OR'
                    )
                ),
                'limit' => 'limit',
                'page' => 'page',
                'order' => 'order'
            ),
            'delete' => 'WRestDeleteAction',
            'get' => 'WRestGetAction',
            'create' => array(
                'class' => 'WRestCreateAction',
                'scenario' => 'update'
            ),
            'update' => array(
                'class' => 'WRestUpdateAction',
                'scenario' => 'update'
            )
        );
    }
}