Definition at line 50 of file facet_manager.inc.
◆ __construct()
FacetManager::__construct |
( |
|
$id, |
|
|
|
$target |
|
) |
| |
Definition at line 56 of file facet_manager.inc.
60 $this->facets = array();
62 $this->target->addFacetTaggingHandler(array($this,
onTagItem));
◆ addFacet()
FacetManager::addFacet |
( |
|
$title, |
|
|
|
$facet |
|
) |
| |
Definition at line 65 of file facet_manager.inc.
67 $this->facets[$title] = $facet;
68 $facet->manager = $this;
◆ drawForm()
FacetManager::drawForm |
( |
| ) |
|
Definition at line 101 of file facet_manager.inc.
104 <div
id=
'<?echo $this->id?>' class=
'facet_form'>
106 foreach($this->facets as $title => $facet)
109 <span style=
'display: inline-block'><label
for=
'<?echo $facet->getID()?>'><?echo $title?></label>
◆ onTagItem()
FacetManager::onTagItem |
( |
|
$item, |
|
|
|
$attrs |
|
) |
| |
Definition at line 73 of file facet_manager.inc.
75 if ($item instanceof AbstractSearchResult)
80 foreach ($this->facets as $title => $facet)
82 $attrs = $facet->onTagItem($item, $attrs);
◆ writeScript()
FacetManager::writeScript |
( |
| ) |
|
Definition at line 88 of file facet_manager.inc.
90 $script =
"<script type=\"text/javascript\">\nwindow.addEvent('domready', function()\n{\n\tvar {$this->target->getID()}_facet_manager = new FacetManager('{$this->target->getID()}');\n";
92 foreach($this->facets as $facet)
94 $script .= $facet->writeScript();
97 $script .=
"\n});\n</script>";
◆ $facets
◆ $id
◆ $target
The documentation for this class was generated from the following file: