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"; } } }
public function testSetProperties() { $properties = array('identifier' => 'btnSave'); $this->button->setProperties($properties); $this->assertEquals($properties, $this->button->getProperties()); }