Request->contains('limit') ? intval($this->Request['limit']) : 0; $storages = $this->getModule('storage')->getStorages($limit); $result = $this->getModule('bconsole')->bconsoleCommand($this->director, array('.storage')); if ($result->exitcode === 0) { $storages_output = array(); foreach($storages as $storage) { if(in_array($storage->name, $result->output)) { $storages_output[] = $storage; } } $this->output = $storages_output; $this->error = StorageError::ERROR_NO_ERRORS; } else { $this->output = $result->output; $this->error = $result->exitcode; } } } ?>