function hook_domainview in Domain Access 7.2
Same name and namespace in other branches
- 5 API.php \hook_domainview()
- 6.2 API.php \hook_domainview()
Allows Domain modules to add columns to the domain list view at path 'admin/structure/domain/view'.
Parameters
$op: The operation being performed. Valid requests are: -- 'header' defines a column header according to theme_table. -- 'query' passes the query object that defines the table structure. Your module should add its joins and fields here. -- 'data' defines the data to be written in the column for the specified domain. These will match the order of your $header.
$domain: The $domain object prepared by hook_domainload().
Return value
Return values vary based on the $op value. -- 'header' return a $header array formatted as per theme_table(). -- 'query' modify the $query object. For details see @link http://drupal.org/node/310075 -- 'data' return an array of $data elements to print in the row.
See also
domain_user_domaininfo()
Related topics
1 function implements hook_domainview()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- domain_alias_domainview in domain_alias/
domain_alias.module - Implements hook_domainview().
1 invocation of hook_domainview()
- domain_view in ./
domain.admin.inc - The main administration page, a list of active domains.
File
- ./
domain.api.php, line 228 - API documentation file.
Code
function hook_domainview($op, $domain = array(), $query = NULL) {
switch ($op) {
case 'header':
return array(
array(
'data' => t('UID'),
'field' => 'de.uid',
),
);
break;
case 'query':
$query
->leftJoin('domain_editor', 'de', 'd.domain_id = de.domain_id');
$query
->addField('de', 'uid');
break;
case 'data':
return array(
$domain['uid'],
);
break;
}
}