Ejemplo n.º 1
0
function printButtonEventBindings($buttons)
{
    foreach ($buttons as $key => $buttonProperties) {
        $button = new Button();
        $button->setProperties($buttonProperties);
        $button->setIdentifier($key);
        if (!empty($buttonProperties['function'])) {
            echo "\t\$('#{$button->getId()}').click({$buttonProperties['function']});", "\n";
        }
    }
}
Ejemplo n.º 2
0
 public function testSetProperties()
 {
     $properties = array('identifier' => 'btnSave');
     $this->button->setProperties($properties);
     $this->assertEquals($properties, $this->button->getProperties());
 }