mirror of
				https://github.com/Icinga/icingaweb2-module-director.git
				synced 2025-10-31 11:24:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| use Icinga\Module\Director\Web\Controller\ObjectController;
 | |
| 
 | |
| use Icinga\Data\Filter\Filter;
 | |
| 
 | |
| class Director_CommandController extends ObjectController
 | |
| {
 | |
|     public function init()
 | |
|     {
 | |
|         parent::init();
 | |
|         if ($this->object) {
 | |
|             $this->getTabs()->add('arguments', array(
 | |
|                 'url'       => 'director/command/arguments',
 | |
|                 'urlParams' => array('name' => $this->object->object_name),
 | |
|                 'label'     => 'Arguments'
 | |
|             ));
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     public function argumentsAction()
 | |
|     {
 | |
|         $this->getTabs()->activate('arguments');
 | |
|         $this->view->title = $this->translate('Command arguments');
 | |
| 
 | |
|         $this->view->table = $this
 | |
|             ->loadTable('icingaCommandArgument')
 | |
|             ->setCommandObject($this->object)
 | |
|             ->setFilter(Filter::where('command', $this->params->get('name')));
 | |
| 
 | |
|         $form = $this->view->form = $this    
 | |
|             ->loadForm('icingaCommandArgument')
 | |
|             ->setCommandObject($this->object);
 | |
| 
 | |
|         if ($id = $this->params->shift('argument_id')) {
 | |
|             $form->loadObject($id);
 | |
|         }
 | |
| 
 | |
|         $form->handleRequest();
 | |
|     }
 | |
| }
 |