Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
CategoryGridDataProvider.inc.php
1 <?php
2 
17 // Import base class.
18 import('lib.pkp.classes.controllers.grid.GridDataProvider');
19 
21 
22  /* @var GridDataProvider A grid data provider that can be
23  * used by this category grid data provider to provide access
24  * to common data.
25  */
26  var $_dataProvider;
27 
31  function CategoryGridDataProvider() {
32  parent::GridDataProvider();
33  }
34 
35 
36  //
37  // Getters and setters.
38  //
43  function getDataProvider() {
44  return $this->_dataProvider;
45  }
46 
51  function setDataProvider($dataProvider) {
52  if (is_a($dataProvider, 'CategoryGridDataProvider')) {
53  assert(false);
54  $dataProvider = null;
55  }
56 
57  $this->_dataProvider = $dataProvider;
58  }
59 
60 
61  //
62  // Overriden methods from GridDataProvider
63  //
67  function setAuthorizedContext(&$authorizedContext) {
68  // We need to pass the authorized context object to
69  // the grid data provider object, if any.
70  $dataProvider = $this->getDataProvider();
71  if ($dataProvider) {
72  $dataProvider->setAuthorizedContext($authorizedContext);
73  }
74 
75  parent::setAuthorizedContext($authorizedContext);
76  }
77 
78 
79  //
80  // Template methods to be implemented by subclasses
81  //
88  function &getCategoryData($categoryDataElement, $filter = null) {
89  assert(false);
90  }
91 }
92 
93 ?>
& getCategoryData($categoryDataElement, $filter=null)
Provide access to category grid data. Can optionally use a grid data provider object that already pro...
Provide access to grid data.