function entityqueue_entity_info in Entityqueue 7
Implements hook_entity_info().
File
- ./
entityqueue.module, line 313 - Allows users to collect entities in arbitrarily ordered lists.
Code
function entityqueue_entity_info() {
$return = array(
'entityqueue_subqueue' => array(
'label' => t('Subqueue'),
'plural label' => t('Subqueues'),
'entity class' => 'EntitySubqueue',
'controller class' => 'EntitySubqueueEntityController',
'module' => 'entityqueue',
'base table' => 'entityqueue_subqueue',
'load hook' => 'entityqueue_subqueue_load',
'access callback' => 'entityqueue_access',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'subqueue_id',
'bundle' => 'queue',
'label' => 'label',
),
'bundles' => array(),
'bundle keys' => array(
'bundle' => 'name',
),
'view modes' => array(
'full' => array(
'label' => t('queue'),
'custom settings' => FALSE,
),
),
'metadata controller class' => '',
),
);
foreach (entityqueue_queue_load_multiple() as $name => $queue) {
$return['entityqueue_subqueue']['bundles'][$name] = array(
'label' => $queue->label,
'admin' => array(
'path' => 'admin/structure/entityqueue/list/%entityqueue_queue',
'real path' => 'admin/structure/entityqueue/list/' . $name,
'bundle argument' => 4,
'access callback' => 'entityqueue_queue_access',
'access arguments' => array(
'view',
$name,
),
),
);
}
// Support the Entity cache module.
// if (module_exists('entitycache')) {
// $return['entityqueue']['field cache'] = FALSE;
// $return['entityqueue']['entity cache'] = TRUE;
// }
return $return;
}