Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 public function testGetSelectors()
 {
     $this->assertEmpty($this->objPalette->getSelectors());
     $this->objPalette->addProperty('done');
     $this->assertArrayHasKey('done', $this->objPalette->getSelectors());
 }