public function indexAction()
 {
     $result = new Server\Result();
     ob_start();
     $request = $this->parseRequest();
     $dataManager = new Ui\DataManager($request['modelName'], $request['managerName']);
     $dataManager->draw($request['params'], $request['model']);
     $result->content = ob_get_contents();
     ob_end_clean();
     $result->send();
 }
Exemple #2
0
<?php

$dataManager = new Ui\DataManager('Migrations\\Migration');
$dataManager->draw();
Exemple #3
0
<?php

if (class_exists($options['relation']['model'])) {
    if ($options['input']->activeForm->model && $options['input']->activeForm->model->pk()) {
        $dataManager = new \Ui\DataManager($options['relation']['type'] == 'relModel' ? $options['relation']['relModel'] : $options['relation']['model'], 'manager');
        $dataManager->draw(['relation' => $options['input']->colParams['relation']], $options['input']->activeForm->model);
        ?>
        <script>
            inji.onLoad(function () {
              inji.Ui.dataManagers.get($('#<?php 
        echo $dataManager->managerId;
        ?>
'));
            })
        </script>
        <?php 
    } else {
        $dataManager = new \Ui\DataManager($options['relation']['type'] == 'relModel' ? $options['relation']['relModel'] : $options['relation']['model'], 'manager');
        $dataManager->predraw();
        echo '<h3>' . $dataManager->table->name . '</h3>';
        echo '<h4 class=" text-muted">Чтобы добавить связи, сначала создайте объект</h4>';
        echo '<p class=" text-muted">Просто заполните доступные поля и нажмите кнопку внизу формы. После этого дополнительные поля разблокируются</p>';
    }
} else {
    echo "<!-- class{$options['relation']['model']} none exist -->";
}
Exemple #4
0
<div class="row">
  <div class="col-lg-12">
    <?php 
$categoryManager = new Ui\DataManager('Tasks\\Task', 'manager');
$categoryManager->draw(['filters' => ['task_status_id' => ['value' => [1, 2]]]]);
?>
  </div>
</div>
Exemple #5
0
<?php

$dataManager = new Ui\DataManager('Menu\\Menu');
$dataManager->draw(['appType' => $appType]);