本文整理汇总了PHP中parent::grid方法的典型用法代码示例。如果您正苦于以下问题:PHP parent::grid方法的具体用法?PHP parent::grid怎么用?PHP parent::grid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parent
的用法示例。
在下文中一共展示了parent::grid方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setGrid
/**
* Initiate grid
*/
protected static function setGrid()
{
parent::$grid = ['grid' => ['id' => ['title' => 'Id', 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'int', 'style' => 'width: 60px;']], 'title' => ['title' => t('Title'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'type' => ['title' => t('Type'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'numberViews' => ['title' => t('Number Views'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'sticked' => ['title' => t('Sticked'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'null' => ['title' => t('Actions')]]];
}
示例2: setGrid
/**
* Initiate grid
*/
protected static function setGrid()
{
parent::$grid = ['grid' => ['id' => ['title' => 'Id', 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'int', 'style' => 'width: 60px;']], 'name' => ['title' => t('Name'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'key' => ['title' => t('Key'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'subject' => ['title' => t('Subject'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'null' => ['title' => t('Actions')]]];
}
示例3: setGrid
/**
* Initiate grid
*/
protected static function setGrid()
{
parent::$grid = ['grid' => ['name' => ['title' => t('Name'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'username' => ['title' => t('Username'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'email' => ['title' => t('Email'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'moderator' => ['title' => t('Moderator'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => 'width:100px']], 'admin' => ['title' => t('Admin'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => 'width:100px']], 'karma' => ['title' => t('Karma'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => 'width:100px']], 'status' => ['title' => t('Status'), 'order' => true, 'filter' => ['type' => 'select', 'sanitize' => 'int', 'using' => null, 'values' => Users::getStatusesWithLabels(), 'style' => 'width: 100px;']], 'null' => ['title' => t('Actions')]], 'query' => ['columns' => ['a.id', "CONCAT(a.firstname, ' ', a.lastname) as name ", 'a.username', 'a.gender', 'a.email', 'a.status', 'a.admin', 'a.moderator', 'a.karma'], 'joins' => [], 'groupBy' => 'a.id']];
}
示例4: setGrid
protected static function setGrid()
{
parent::$grid = ['grid' => ['id' => ['title' => 'Id', 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'int', 'style' => 'width: 60px;']], 'name' => ['title' => t('Name'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'slug' => ['title' => t('Slug'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'description' => ['title' => t('Description'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'numberPosts' => ['title' => t('Number posts'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'null' => ['title' => t('Actions')]]];
}
示例5: setGrid
/**
* Initiate grid
*/
protected static function setGrid()
{
parent::$grid = ['grid' => ['title' => ['title' => t('Title'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'username' => ['title' => t('Users'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'null' => ['title' => t('Actions')]], 'query' => ['columns' => ['a.id', 'a.title', 'a.sticked', 'u.username'], 'joins' => [['type' => 'join', 'model' => 'Phanbook\\Models\\Users', 'on' => 'a.usersId = u.id', 'alias' => 'u']], 'where' => 'a.type = "pages"']];
}
示例6: setGrid
/**
* Initiate grid
*/
protected static function setGrid()
{
parent::$grid = ['grid' => ['id' => ['title' => t('Id'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'int', 'style' => 'width: 60px;']], 'key' => ['title' => t('Key'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'type' => ['title' => t('Type'), 'order' => true, 'filter' => ['type' => 'select', 'sanitize' => 'int', 'using' => null, 'values' => Configuration::getTypesWithLabels(), 'style' => 'width: 100px;']], 'value' => ['title' => t('Value'), 'filter' => ['type' => 'input', 'sanitize' => 'number', 'style' => 'width : 90px;']], 'caption' => ['title' => t('Caption'), 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => ''], 'display_filter' => 'truncate'], 'null' => ['title' => t('Actions')]], 'actions' => ['delete' => ['title' => t('Delete selected'), 'class' => 'btn btn-sm btn-danger']]];
}