src/CarteBlanche/Controller/Dev.php
public function adminAction()
    {
        $fields = $values = array();

/*
TODO

- clear web cache
- clear app cache
- clear i18n cache
- clear generated images
- disable caches
*/


        $fields[] = new Field('clear_web_cache', array(
            'type'=>'submit',
            'action'=>'test',
            'value'=>'ok',
            'label'=>'Clear web cache',
        ));

        $form = new \Tool\Form(array(
            'form_id'=>'app_admin',
            'fields'=>$fields,
            'values'=>$values
        ));

        if ($this->getContainer()->get('request')->isPost()) {
            $_posted = $this->getContainer()->get('request')->getData();

            if (isset($_posted['clear_web_cache']) && $_posted['clear_web_cache']==='ok') {
                $path = \Library\Helper\Directory::slashDirname(CarteBlanche::getPath('cache_path'));
                $ok = \Library\Helper\Directory::purge($_path);
            }

            var_export($_posted);
            exit('yo');
        }

        return array(self::$views_dir.'app_admin', array(
            'title' => 'App admin',
            'form'=>$form,
        ));
    }
public function adminAction()
    {
        $fields = $values = array();

/*
TODO

- clear web cache
- clear app cache
- clear i18n cache
- clear generated images
- disable caches
*/


        $fields[] = new Field('clear_web_cache', array(
            'type'=>'submit',
            'action'=>'test',
            'value'=>'ok',
            'label'=>'Clear web cache',
        ));

        $form = new \Tool\Form(array(
            'form_id'=>'app_admin',
            'fields'=>$fields,
            'values'=>$values
        ));

        if ($this->getContainer()->get('request')->isPost()) {
            $_posted = $this->getContainer()->get('request')->getData();

            if (isset($_posted['clear_web_cache']) && $_posted['clear_web_cache']==='ok') {
                $path = \Library\Helper\Directory::slashDirname(CarteBlanche::getPath('cache_path'));
                $ok = \Library\Helper\Directory::purge($_path);
            }

            var_export($_posted);
            exit('yo');
        }

        return array(self::$views_dir.'app_admin', array(
            'title' => 'App admin',
            'form'=>$form,
        ));
    }
Page of application administration (test)

@return string The view content