create form for language url

This commit is contained in:
Manuel Raynaud
2013-10-23 18:02:04 +02:00
parent 3dd51d98b6
commit c924b2a5bd
6 changed files with 152 additions and 29 deletions

View File

@@ -231,7 +231,6 @@ class LangController extends BaseAdminController
if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response;
$error_msg = false;
$exception = false;
$behaviorForm = new LangDefaultBehaviorForm($this->getRequest());
@@ -258,4 +257,34 @@ class LangController extends BaseAdminController
// At this point, the form has error, and should be redisplayed.
return $this->renderDefault();
}
public function domainAction()
{
if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response;
$error_msg = false;
}
public function activateDomainAction()
{
$this->domainActivation(1);
}
public function deactivateDomainAction()
{
$this->domainActivation(0);
}
private function domainActivation($activate)
{
if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::UPDATE)) return $response;
$error_msg = false;
ConfigQuery::create()
->filterByName('one_domain_foreach_lang')
->update(array('Value' => $activate));
$this->redirectToRoute('admin.configuration.languages');
}
}