You are here

class BoxMetadataController in Boxes 7.2

Extend the defaults.

Hierarchy

Expanded class hierarchy of BoxMetadataController

1 string reference to 'BoxMetadataController'
boxes_entity_info in ./boxes.module
Implements hook_entity_info().

File

includes/boxes.info.inc, line 11
Provides Entity metadata integration.

View source
class BoxMetadataController extends EntityDefaultMetadataController {
  public function entityPropertyInfo() {
    $info = parent::entityPropertyInfo();
    $properties =& $info[$this->type]['properties'];
    $properties['label'] = array(
      'label' => t('Label'),
      'description' => t('The box label'),
      'getter callback' => 'entity_property_getter_method',
      'schema field' => 'label',
    );
    $properties['title'] = array(
      'label' => t('Title'),
      'description' => t('The box title'),
      'getter callback' => 'entity_property_getter_method',
      'schema field' => 'title',
    );
    $properties['view_mode'] = array(
      'label' => t('View Mode'),
      'description' => t('View mode of the box'),
      'getter callback' => 'entity_property_getter_method',
      'schema field' => 'view_mode',
      'required' => TRUE,
    );
    $properties['delta'] = array(
      'getter callback' => 'entity_property_getter_method',
      'description' => t('The box delta.'),
      'label' => t('Block Delta'),
      'required' => TRUE,
      'schema field' => 'delta',
    );
    $properties['type'] = array(
      'type' => 'box_type',
      'getter callback' => 'entity_property_getter_method',
      'setter callback' => 'entity_property_verbatim_set',
      'setter permission' => 'administer boxes',
      'required' => TRUE,
      'description' => t('The box type.'),
    ) + $properties['type'];
    return $info;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BoxMetadataController::entityPropertyInfo public function Overrides EntityDefaultMetadataController::entityPropertyInfo
EntityDefaultMetadataController::$type protected property
EntityDefaultMetadataController::bundleOptionsList public static function A options list callback returning all bundles for an entity type.
EntityDefaultMetadataController::convertSchema protected function Return a set of properties for an entity based on the schema definition
EntityDefaultMetadataController::__construct public function