public function render() { foreach ($this->_actions as $key => $cfg) { if (!ACL::is_route_allowed($cfg['route'])) { unset($this->_actions[$key]); } } return Ext::actions($this->_actions); }
/** * Get events for object * @param string $objectClass * @return Ext_Events */ public static function getEvents($objectClass) { $objectClass = ucfirst($objectClass); if (strpos($objectClass, 'Ext_Events') === 0) { $objectClass = substr($objectClass, 10); } elseif (strpos($objectClass, 'Ext_') === 0) { $objectClass = substr($objectClass, 4); } return call_user_func(array(Ext::getEventClass($objectClass), 'getInstance')); }
public function testGetPropertyClass() { $this->assertEquals(Ext::getPropertyClass('Grid'), 'Ext_Property_Grid'); $this->assertEquals(Ext::getPropertyClass('Component_Field_System_Dictionary'), 'Ext_Property_Component_Field_System_Dictionary'); }
<?php defined('SYSPATH') or die('No direct script access.'); /** * @version SVN: $Id:$ */ echo Ext::form_begin($action, $attributes); echo form::hidden($hash_input_name, $hash);
<?php echo Ext::form_begin(); ?> <?php echo $form->render(); ?> <?php echo Ext::buttons_begin(); echo Ext::submit('submit', 'Ответить', 'Вы уверены?'); echo Ext::buttons_end(); ?> <?php echo Ext::form_end();
protected function _loadConfig() { $this->_config = new Ext_Config(Ext::getPropertyClass(str_replace('Ext_', '', $this->getClass()))); }
<?php defined('SYSPATH') or die('No direct script access.'); /** * @version SVN: $Id:$ */ ?> <?php if (!empty($actions)) { echo Ext::actions_begin(); foreach ($actions as $action) { ?> <p><?php echo Ext::actions_row($action['route'], $action['title']); ?> </p> <?php } echo Ext::actions_end(); }
_config_tbody_<?php echo $type; ?> " class="<?php echo $name; ?> _config_tbody"> <?php foreach ($fieldschema->get_field_names() as $field_name) { echo Ext::form_row($fieldschema->get_field($field_name)->render(), $fieldschema->get_field($field_name)->get_label()); } ?> </tbody> <?php } echo Ext::form_fields_end(); ?> <script type="text/javascript"> <!-- $(document).ready(function(){ $('[name=<?php echo $type_field->get_name(); ?> ]').change(function(){ $('.<?php echo $name; ?> _config_tbody').hide(); var val = $(this).val(); <?php //TODO: Убрать костыль в select
<?php abstract class Base { abstract function someMethod($param); } class Ext extends Base { function someMethod($param = "default") { echo $param, "\n"; } } $a = new Ext(); $a->someMethod("foo"); $a->someMethod();
<?php defined('SYSPATH') or die('No direct script access.'); /** * @version SVN: $Id:$ */ ?> <div class="accordion" id="leftMenu"> <?php echo Ext::menu_row(0, $root); ?> </div>
<?php defined('SYSPATH') or die('No direct script access.'); /** * @version SVN: $Id:$ */ echo Ext::table_begin(); ?> <tr> <td>Инструкции по восстановлению высланы на указанный e-mail</td> </tr> <?php echo Ext::table_end();
protected function render_item(&$next_id, $name, $cfg, $parent) { $menu = ''; if ($parent == -1) { $menu .= Ext::menu_begin($name); } if (is_array($cfg)) { $cur_id = $next_id; $cur_menu = ''; if ($parent != -1) { $cur_menu .= Ext::menu_row($next_id, $name, NULL, $parent); } $next_id++; $cur_menu_subitems = ''; foreach ($cfg as $subname => $subcfg) { $cur_menu_subitems .= $this->render_item($next_id, $subname, $subcfg, $cur_id); } if (!empty($cur_menu_subitems)) { $menu .= $cur_menu . $cur_menu_subitems; } } else { if (ACL::is_route_allowed($cfg)) { $menu .= Ext::menu_row($next_id, $name, $cfg, $parent); if ($this->is_route_active($cfg)) { $this->_active_id = $next_id; } } $next_id++; } if ($parent == -1) { $menu .= Ext::menu_end($this->_active_id); } return $menu; }
protected function _loadConfig() { $this->_config = new Ext_Config(Ext::getPropertyClass('Instance')); }
<?php defined('SYSPATH') or die('No direct script access.'); foreach ($submits as $submit) { echo Ext::submit($submit['name'], $submit['value']); }
<?php defined('SYSPATH') or die('No direct script access.'); /** * @version SVN: $Id:$ */ echo Ext::form_row($input, $label, $error);