File tree Expand file tree Collapse file tree 3 files changed +67
-24
lines changed
src/MetaModels/Filter/Setting Expand file tree Collapse file tree 3 files changed +67
-24
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * The MetaModels extension allows the creation of multiple collections of custom items,
4+ * each with its own unique set of selectable attributes, with attribute extendability.
5+ * The Front-End modules allow you to build powerful listing and filtering of the
6+ * data in each collection.
7+ *
8+ * PHP version 5
9+ *
10+ * @package MetaModels
11+ * @subpackage FilterCheckbox
12+ * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
13+ * @copyright The MetaModels team.
14+ * @license LGPL.
15+ * @filesource
16+ */
17+
18+ use MetaModels \Filter \Setting \Events \CreateFilterSettingFactoryEvent ;
19+ use MetaModels \Filter \Setting \CheckboxFilterSettingTypeFactory ;
20+ use MetaModels \MetaModelsEvents ;
21+
22+ return array
23+ (
24+ MetaModelsEvents::FILTER_SETTING_FACTORY_CREATE => array (
25+ function (CreateFilterSettingFactoryEvent $ event ) {
26+ $ event ->getFactory ()->addTypeFactory (new CheckboxFilterSettingTypeFactory ());
27+ }
28+ )
29+ );
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * The MetaModels extension allows the creation of multiple collections of custom items,
4+ * each with its own unique set of selectable attributes, with attribute extendability.
5+ * The Front-End modules allow you to build powerful listing and filtering of the
6+ * data in each collection.
7+ *
8+ * PHP version 5
9+ *
10+ * @package MetaModels
11+ * @subpackage FilterCheckbox
12+ * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
13+ * @copyright The MetaModels team.
14+ * @license LGPL.
15+ * @filesource
16+ */
17+
18+ namespace MetaModels \Filter \Setting ;
19+
20+ /**
21+ * Attribute type factory for tags filter settings.
22+ */
23+ class CheckboxFilterSettingTypeFactory extends AbstractFilterSettingTypeFactory
24+ {
25+ /**
26+ * {@inheritDoc}
27+ */
28+ public function __construct ()
29+ {
30+ parent ::__construct ();
31+
32+ $ this
33+ ->setTypeName ('checkbox ' )
34+ ->setTypeIcon ('system/modules/metamodelsfilter_checkbox/html/filter_checkbox.png ' )
35+ ->setTypeClass ('MetaModels\Filter\Setting\Checkbox ' )
36+ ->allowAttributeTypes ('checkbox ' );
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments