public static function EntityReference_SelectionHandler_EntityQueue::settingsForm in Entityqueue 7
Overrides EntityReference_SelectionHandler_Generic::settingsForm().
Overrides EntityReference_SelectionHandler_Generic::settingsForm
File
- plugins/
entityreference/ selection/ EntityReference_SelectionHandler_EntityQueue.class.php, line 44 - Definition of EntityReference_SelectionHandler_EntityQueue.
Class
- EntityReference_SelectionHandler_EntityQueue
- Defines a Entityreference selection handler for Entityqueue.
Code
public static function settingsForm($field, $instance) {
$form = parent::settingsForm($field, $instance);
$access = $instance['entity_type'] === 'entityqueue_subqueue';
// Show an explanation describing where bundles may be selected.
$form['warning'] = array(
'#type' => 'item',
'#title' => t('DO NOT USE'),
'#markup' => t('This mode should only be used on Entity Queues. This field is on a %type entity type and is not supported.', array(
'%type' => $instance['entity_type'],
)),
'#weight' => -1,
'#access' => !$access,
);
// Force all bundles to be accepted.
$form['target_bundles'] = array(
'#type' => 'value',
'#value' => array(),
);
// Show an explanation describing where bundles may be selected.
$form['target_bundles_help'] = array(
'#type' => 'item',
'#title' => t('Target bundles'),
'#markup' => t('Bundles are filtered on a per-queue basis from the <a href="!url">queue\'s settings</a>.', array(
'!url' => url('admin/structure/entityqueue/list/' . $instance['bundle'] . '/edit'),
)),
'#weight' => -1,
'#access' => $access,
);
$form['sort']['#access'] = $access;
return $form;
}