<?php $dataManager = new Ui\DataManager('Migrations\\Migration'); $dataManager->draw();
public function delCategoryAction() { $request = $this->parseRequest(); $dataManager = new Ui\DataManager($request['modelName'], $request['managerName']); if ($dataManager->checkAccess() && !empty($dataManager->managerOptions['categorys'])) { $categoryModel = $dataManager->managerOptions['categorys']['model']; $model = $categoryModel::get($request['key'], $categoryModel::index(), $request['params']); if ($model) { $model->delete($request['params']); } } $result = new Server\Result(); $result->send(); }
<?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 -->"; }
<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>
<?php $dataManager = new Ui\DataManager('Menu\\Menu'); $dataManager->draw(['appType' => $appType]);