Файл: concrete5.7.5.6/concrete/controllers/dialog/page/add_external.php
Строк: 43
<?php
namespace ConcreteControllerDialogPage;
use ConcreteControllerBackendUserInterfacePage as BackendInterfacePageController;
use PageType;
use Loader;
use URL;
use ConcreteCorePageEditResponse;
class AddExternal extends BackendInterfacePageController {
protected $viewPath = '/dialogs/page/add_external';
protected function canAccess() {
return $this->permissions->canAddExternalLink();
}
public function view() {
}
public function submit() {
if ($this->validateAction()) {
$request = Request::getInstance();
$this->page->addCollectionAliasExternal(
$request->request->get('name'),
$request->request->get('link'),
$request->request->get('openInNewWindow')
);
$r = new EditResponse();
$r->setPage($this->page);
$r->setRedirectURL(URL::to('/dashboard/sitemap'));
$r->outputJSON();
}
}
}