Beispiel #1
0
 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);
 }
Beispiel #2
0
 /**
  * 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'));
 }
Beispiel #3
0
 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');
 }
Beispiel #4
0
<?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);
Beispiel #5
0
<?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();
Beispiel #6
0
 protected function _loadConfig()
 {
     $this->_config = new Ext_Config(Ext::getPropertyClass(str_replace('Ext_', '', $this->getClass())));
 }
Beispiel #7
0
<?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();
}
Beispiel #8
0
_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
Beispiel #9
0
<?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();
Beispiel #10
0
<?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();
Beispiel #12
0
 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;
 }
Beispiel #13
0
 protected function _loadConfig()
 {
     $this->_config = new Ext_Config(Ext::getPropertyClass('Instance'));
 }
Beispiel #14
0
<?php

defined('SYSPATH') or die('No direct script access.');
foreach ($submits as $submit) {
    echo Ext::submit($submit['name'], $submit['value']);
}
Beispiel #15
0
<?php

defined('SYSPATH') or die('No direct script access.');
/**
 * @version SVN: $Id:$
 */
echo Ext::form_row($input, $label, $error);