/** * Get active sub palettes * * @param Palette $objPalette * @param ModelInterface $objModel * * @return \DcaTools\Definition\SubPalette[] */ public static function getActiveSubPalettesFor(Palette $objPalette, ModelInterface $objModel) { $arrSubPalettes = array(); foreach ($objPalette->getSelectors() as $objProperty) { $objSubPalette = static::getActivePropertySubPalette($objProperty, $objModel); if ($objSubPalette !== null) { $arrSubPalettes[$objSubPalette->getName()] = $objSubPalette; } } return $arrSubPalettes; }
public function testGetSelectors() { $this->assertEmpty($this->objPalette->getSelectors()); $this->objPalette->addProperty('done'); $this->assertArrayHasKey('done', $this->objPalette->getSelectors()); }