You are here

class D3ViewsLibraryInfoController in d3.js 7

Hierarchy

Expanded class hierarchy of D3ViewsLibraryInfoController

2 string references to 'D3ViewsLibraryInfoController'
d3_views_library_info_handlers in modules/d3_views/d3_views.module
hook_library_info_handlers in ./d3.api.php
Add custom library info handlers.

File

modules/d3_views/includes/D3ViewsLibraryInfoController.inc, line 3

View source
class D3ViewsLibraryInfoController extends D3LibraryInfoController {
  public function isDataKey($key) {
    return $key == $this
      ->getDataKey();
  }
  public function getDataKey() {
    if (!($library = $this
      ->value())) {
      return NULL;
    }
    $info = $library['views']['fields'];
    return !empty($info['_info']['data_key']) ? $info['_info']['data_key'] : 'rows';
  }
  public function getFields() {
    if (!($library = $this
      ->value())) {
      return array();
    }
    return !empty($library['views']['fields']) ? $library['views']['fields'] : array();
  }
  public function getSettings() {
    if (!($library = $this
      ->value())) {
      return array();
    }
    return !empty($library['views']['settings']) && is_array($library['views']['settings']) ? $library['views']['settings'] : array();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
D3LibraryInfoController::$library protected property Library fully loaded.
D3LibraryInfoController::$mapping public property Mapping class.
D3LibraryInfoController::$processor public property Processor class.
D3LibraryInfoController::children protected function Helper function to get child elements.
D3LibraryInfoController::machineName public function
D3LibraryInfoController::setLibrary public function Set the current library for this handler.
D3LibraryInfoController::value public function Return a reference to the loaded library.
D3LibraryInfoController::__construct public function
D3ViewsLibraryInfoController::getDataKey public function
D3ViewsLibraryInfoController::getFields public function
D3ViewsLibraryInfoController::getSettings public function
D3ViewsLibraryInfoController::isDataKey public function