You are here

public static function EntityDefaultViewsController::optionsListCallback in Entity API 7

A callback returning property options, suitable to be used as views options callback.

File

views/entity.views.inc, line 715
Provide views data for modules making use of the entity CRUD API.

Class

EntityDefaultViewsController
Default controller for generating basic views integration.

Code

public static function optionsListCallback($type, $selector, $op = 'view') {
  $wrapper = entity_metadata_wrapper($type, NULL);
  $parts = explode(':', $selector);
  foreach ($parts as $part) {
    $wrapper = $wrapper
      ->get($part);
  }
  return $wrapper
    ->optionsList($op);
}