BEdita API doc | 4-cactus
  • Class
  • Tree
  • Deprecated
  • Download

Classes

  • Addon
  • AddressbookController
  • AddressbookShell
  • AdminController
  • Alias
  • Annotation
  • ApiAuthComponent
  • ApiBaseController
  • ApiFormatterComponent
  • ApiUploadComponent
  • ApiValidatorComponent
  • AppController
  • AppError
  • AppHelper
  • Application
  • AppModel
  • Area
  • AreasController
  • Audio
  • AuthenticationsController
  • BannedIp
  • BEAppModel
  • BEAppObjectModel
  • BeAuthComponent
  • BeAuthFacebookComponent
  • BeAuthGoogleComponent
  • BeAuthTwitterComponent
  • BeCallbackManager
  • BeConfigure
  • BeCustomPropertyComponent
  • BeditaAnnotationModel
  • BeditaBaseShell
  • BeditaCollectionModel
  • BeditaContentModel
  • BeditaExportFilter
  • BeditaImportFilter
  • BeditaObjectModel
  • BeditaProductModel
  • BeditaShell
  • BeditaSimpleObjectModel
  • BeditaSimpleStreamModel
  • BeditaStreamModel
  • BeEmbedFlashHelper
  • BeEmbedHtml5Helper
  • BeEmbedMediaHelper
  • BeErrorCode
  • BeExceptionHandler
  • BEFile
  • BeFileHandlerComponent
  • BeFormHelper
  • BeFrontHelper
  • BeHashComponent
  • BeHtmlHelper
  • BeLangTextComponent
  • BeLib
  • BeMailComponent
  • BEObject
  • BeObjectCache
  • BePaginatorToolbarHelper
  • BeSchema
  • BeSecurityComponent
  • BeSystem
  • BeSystemComponent
  • BeThumb
  • BeTimeHelper
  • BeToolbarHelper
  • BeTreeComponent
  • BeTreeHelper
  • BeUploadToObjComponent
  • BeurlHelper
  • BeVimeoComponent
  • BeYoutubeComponent
  • BuildFilterBehavior
  • CacheableBehavior
  • CacheShell
  • CallbackBehavior
  • CaptchaComponent
  • Caption
  • CaptionsBehavior
  • Card
  • CardsImportFilter
  • Category
  • CleanupDataTask
  • CleanupTask
  • Comment
  • CommentsController
  • CompactResultBehavior
  • Content
  • CreateIndexFieldsBehavior
  • DataShell
  • DataTransfer
  • DateItem
  • DbadminShell
  • DeleteDependentObjectBehavior
  • DeleteObjectBehavior
  • DeployShell
  • Document
  • DocumentsController
  • DumpModel
  • EditorialContentsShell
  • EditorNote
  • Event
  • EventLog
  • EventsController
  • FilesController
  • ForeignDependenceSaveBehavior
  • FrontendController
  • FrontendShell
  • GalleriesController
  • Gallery
  • GeoTag
  • GettextShell
  • Git
  • GravatarHelper
  • Group
  • HashJob
  • History
  • HomeController
  • Image
  • ImageInfoHelper
  • JsonExportFilter
  • JsonImportFilter
  • JsonView
  • LangText
  • Link
  • MailGroup
  • MailGroupCard
  • MailJob
  • MailLog
  • MailMessage
  • MailShell
  • MailTemplate
  • Mask
  • MediaShell
  • MigrateDumpModel
  • MigrateShell
  • Migration
  • MigrationBase
  • MigrationDateItemsShell
  • Module
  • ModulesController
  • ModuleShell
  • MultimediaController
  • NewsController
  • NewsletterController
  • NewsletterShell
  • NotifyBehavior
  • ObjectEditor
  • ObjectProperty
  • ObjectRelation
  • ObjectType
  • ObjectUser
  • PagesController
  • Permission
  • PermissionModule
  • PermsHelper
  • Product
  • Property
  • PropertyOption
  • PublicationShell
  • RedisShell
  • RelationCheck
  • RelationRepair
  • RelationShell
  • RelationStats
  • RemoveDummyNameBehavior
  • ResponseHandlerComponent
  • RestClientModel
  • Revision
  • RevisionObjectBehavior
  • SearchText
  • SearchTextSaveBehavior
  • Section
  • SectionDummy
  • SessionFilterComponent
  • SessionFilterHelper
  • ShortNews
  • SmartyView
  • SoapClientModel
  • SplitterSql
  • StatisticsController
  • Stream
  • StreamLog
  • StreamsController
  • Svn
  • TagsController
  • ThemeSmartyView
  • ThumbnailHelper
  • ThumbShell
  • TransactionComponent
  • TransactionFS
  • TranslationsController
  • Tree
  • TrHelper
  • User
  • UserProperty
  • UsersController
  • Utility
  • Version
  • Video
  • VimeoHelper
  • WebmarksController
  • XmlExportFilter
  • XmlImportFilter
  • XmlJsonConverter
  • XmlView
  • YoutubeHelper

Interfaces

  • ApiAuthInterface
  • MediaProviderInterface
  • UploadableInterface

Exceptions

  • BeditaAjaxException
  • BEditaAllowURLException
  • BeditaBadRequestException
  • BeditaConflictException
  • BEditaDeleteStreamObjException
  • BeditaException
  • BEditaFileExistException
  • BeditaForbiddenException
  • BeditaFrontAccessException
  • BeditaHashException
  • BEditaInfoException
  • BeditaInternalErrorException
  • BEditaIOException
  • BeditaLengthRequiredException
  • BeditaMailException
  • BEditaMediaProviderException
  • BeditaMethodNotAllowedException
  • BEditaMIMEException
  • BeditaNotFoundException
  • BeditaNotImplementedException
  • BeditaPublicationException
  • BeditaRuntimeException
  • BEditaSaveStreamObjException
  • BeditaServiceUnavailableException
  • BeditaUnauthorizedException
  • BEditaUploadPHPException
  • BEditaURLException
  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 
<?php
/*-----8<--------------------------------------------------------------------
 *
 * BEdita - a semantic content management framework
 *
 * Copyright 2008 ChannelWeb Srl, Chialab Srl
 *
 * This file is part of BEdita: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * BEdita is distributed WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with BEdita (see LICENSE.LGPL).
 * If not, see <http://gnu.org/licenses/lgpl-3.0.html>.
 *
 *------------------------------------------------------------------->8-----
 */

/**
 * Controller module Publications: managing of publications, sections and sessions
 *
 *
 * @version         $Revision$
 * @modifiedby      $LastChangedBy$
 * @lastmodified    $LastChangedDate$
 *
 * $Id$
 */
class AreasController extends ModulesController {
    var $name = 'Areas';

    var $helpers    = array('BeTree', 'BeToolbar');
    var $components = array('BeTree', 'BeCustomProperty', 'BeLangText', 'BeUploadToObj', 'BeFileHandler', 'BeSecurity');

    var $uses = array('BEObject', 'Area', 'Section', 'Tree', 'User', 'Group', 'ObjectType','Category') ;
    protected $moduleName = 'areas';
    protected $categorizableModels = array('Section');

    function index($id = null, $order = '', $dir = true, $page = 1, $dim = 20) {
        if ($id == null && !empty($this->params["named"]["id"])) {
            $id = $this->params["named"]["id"];
        }
        // if $id redirect to detail view
        if (!empty($id)) {
            $this->redirect('/areas/view/' . $id);
        }
        $conf = Configure::getInstance();
        $filter['exclude_branch'] = false;
        $filter['object_type_id'] = array(
            $conf->objectTypes['area']['id'],
            $conf->objectTypes['section']['id'],
        );
        $filter['count_annotation'] = array('Comment', 'EditorNote');
        $this->paginatedList($id, $filter, $order, $dir, $page, $dim);
        $this->loadCategories($filter['object_type_id']);
        $this->set('objectTypeIds', $filter['object_type_id']);
    }

    public function view($id = null) {
        $objectTypeId = $this->BEObject->field("object_type_id", array("BEObject.id" => $id));
        $modelName = Configure::read("objectTypes.".$objectTypeId.".model");
        if(empty($modelName)) {
            throw new BeditaException(sprintf(__("Object id not found: %d", true), $id));
        }
        $this->viewObject($this->{$modelName}, $id);
        $dir = ($this->viewVars["object"]["priority_order"] == "asc")? true : false;
        $this->loadChildren($id, "priority", $dir);
        $this->set("objectType", Configure::read("objectTypes.".$objectTypeId.".name"));
        $parentId = null;
        if (empty($id) && !empty($this->params['named']['id'])) {
            $id = $this->params['named']['id'];
        }
        if (!empty($id)) {
            $parentId = $this->Tree->getParent($id);
            // #881 alert user if section has no parent
            if (empty($parentId) && $modelName === 'Section') {
                $this->userErrorMessage(__('Section viewed not in publication tree', true));
                $this->eventError('section not in tree, id: ' . $id);
            }
                    // #1078, #1080 - hidden subsection management
                    $this->readonlyTreePaths($id);
        } else if (!empty($this->params['named']['branch'])) {
            $parentId = $this->params['named']['branch'];
        }
        $this->set('parent_id', $parentId);
        $filters = $this->loadFilters('export');
        $this->set('export_filters',$filters);
    }
     
    /**
     * load paginated contents and no paginated sections of $id publication/section
     *
     * @param int $id
     * @param string $order
     * @param bool $dir
     * @param int $page
     * @param int $dim
     */
    protected function loadChildren($id, $order = "priority", $dir = true, $page = 1, $dim = 20) {
        // get paginated children content (leaf objectTypes) if no other is passed
        if (!empty($this->params["named"]["object_type_id"])
                && $this->params["named"]["object_type_id"] != Configure::read("objectTypes.area.id")
                && $this->params["named"]["object_type_id"] != Configure::read("objectTypes.section.id")) {
            $filter["object_type_id"] = $this->params["named"]["object_type_id"];
        } else {
            $filter["object_type_id"] = Configure::read("objectTypes.leafs.id");
        }
        $filter["count_annotation"] = array("EditorNote");
        $dir = ($this->viewVars["object"]["priority_order"] == "asc")? true : false;
        $this->paginatedList($id, $filter, $order, $dir, $page, $dim);

        // get children sections and paginate
        $filter["object_type_id"] = Configure::read("objectTypes.section.id");
        $filter["count_permission"] = true;
        $filter['exclude_branch'] = false;
        $spage = !empty($this->params['named']['sections-page']) ? $this->params['named']['sections-page'] : 1;
        $sdim = !empty($this->params['named']['sections-dim']) ? $this->params['named']['sections-dim'] : 10;
        $sections = $this->BeTree->getChildren($id, null, $filter, 'priority', true, $spage, $sdim);
        $this->set("sections", $sections["items"]);
        $this->set("sectionsToolbar", $sections['toolbar']);
    }

    function viewArea($id = null) {
        // Get selected area
        $area = null ;
        if($id) {
            $this->Area->containLevel("detailed");
            if(!($area = $this->Area->findById($id))) {
                 throw new BeditaException(sprintf(__("Error loading area: %d", true), $id));
            }
        }

        $property = $this->BeCustomProperty->setupForView($area, Configure::read("objectTypes.area.id"));

        // Data for template
        $this->set('area',$area);
        $this->set('objectProperty', $property);
        $this->set('object', null);
    }

    function viewSection($id = null) {
        $sec = null;
        $this->set('objectProperty', $this->BeCustomProperty->setupForView($sec, Configure::read("objectTypes.section.id"))) ;

        // #578 - Memory exhausted when attempting to create new Section.
        $user = $this->BeAuth->getUserSession();
        $expanded = (!empty($this->params['named']['branch'])) ? array($this->params['named']['branch']) : array();  // #632 - Create new section here issue.
        $this->set('tree', $this->Tree->getAllRoots($user['userid'], null, array('count_permission' => true), $expanded));

        $parentId = null;
        if (empty($id) && !empty($this->params['named']['id'])) {
            $id = $this->params['named']['id'];
        }
        if (!empty($id)) {
            $parentId = $this->Tree->getParent($id);
        } else if (!empty($this->params['named']['branch'])) {
            $parentId = $this->params['named']['branch'];
        }
        $this->set('parent_id', $parentId);
        $this->set('object', null);
    }


     /**
      * Add or modify area
      */
    function saveArea() {
        $this->checkWriteModulePermission();
        $new = (empty($this->data['id'])) ? true : false;
        $this->Transaction->begin();
        if (empty($this->data["syndicate"])) {
            $this->data["syndicate"] = 'off';
        }
        $this->saveObject($this->Area);

        $id = $this->Area->id;
        if(!$new) {

            // remove children
            if (!empty($this->params["form"]["contentsToRemove"])) {
                $childrenToRemove = explode(",", trim($this->params["form"]["contentsToRemove"],","));
                foreach ($childrenToRemove as $idToRemove) {
                    $this->Tree->removeChild($idToRemove, $id);
                }
            }

            $reorder = (!empty($this->params["form"]['reorder'])) ? $this->params["form"]['reorder'] : array();

            // add new children and reorder priority
            foreach ($reorder as $r) {
                $isDesc = $this->Tree->find('count', array(
                    'conditions' => array(
                        'id' => $r['id'],
                        'parent_id' => $id,
                    ),
                ));

                if (!$isDesc) {
                    if ($this->BEObject->getType($r['id']) === 'Section') {
                        $this->userWarnMessage(
                            sprintf(__('A subsection (ID %d) has been removed from this parent by a concurrent editor! (Maybe you using another browser tab?)', true), $r['id'])
                        );
                        continue;
                    }

                    $this->Tree->appendChild($r['id'], $id);
                }

                if (!$this->Tree->setPriority($r['id'], $r['priority'], $id)) {
                    throw new BeditaException( __("Error during reorder children priority", true), $r["id"]);
                }
            }
        }

        $this->Transaction->commit() ;
        $this->userInfoMessage(__("Area saved", true)." - ".$this->data["title"]);
        $this->eventInfo("area ". $this->data["title"]."saved");
    }

    /**
     * Save/modify section.
     */
    function saveSection() {

        $this->checkWriteModulePermission();
        $new = (empty($this->data['id'])) ? true : false;
        $this->Transaction->begin();
        if (empty($this->data["syndicate"])) {
            $this->data["syndicate"] = 'off';
        }
        if(empty($this->data["parent_id"])) {
            throw new BeditaException( __("Missing parent", true));
        }

        $this->saveObject($this->Section);
        $id = $this->Section->id;

        // Move section in the right tree position, if necessary
        if(!$new) {

            if (!$this->BEObject->isFixed($id)) {
                $oldParent = $this->Tree->getParent($id);
                if($oldParent != $this->data["parent_id"]) {
                    if(!$this->Tree->move($this->data["parent_id"], $oldParent, $id)) {
                        throw new BeditaException( __("Error moving section in the tree", true));
                    }
                }
            }

            // save Tree.menu
            $menu = (!empty($this->data['menu']))? 1 : 0;
            $this->Tree->saveMenuVisibility($id, $this->data["parent_id"], $menu);

            // remove children
            if (!empty($this->params["form"]["contentsToRemove"])) {
                $childrenToRemove = explode(",", trim($this->params["form"]["contentsToRemove"],","));
                foreach ($childrenToRemove as $idToRemove) {
                    $this->Tree->removeChild($idToRemove, $id);
                }
            }

            $reorder = (!empty($this->params["form"]['reorder'])) ? $this->params["form"]['reorder'] : array();

            // add new children and reorder priority
            foreach ($reorder as $r) {
                $isDesc = $this->Tree->find('count', array(
                    'conditions' => array(
                        'id' => $r['id'],
                        'parent_id' => $id,
                    ),
                ));

                if (!$isDesc) {
                    if ($this->BEObject->getType($r['id']) === 'Section') {
                        $this->userWarnMessage(
                            sprintf(__('A subsection (ID %d) has been removed from this parent by a concurrent editor! (Maybe you using another browser tab?)', true), $r['id'])
                        );
                        continue;
                    }

                    $this->Tree->appendChild($r['id'], $id);
                }

                if (!$this->Tree->setPriority($r['id'], $r['priority'], $id)) {
                    throw new BeditaException( __("Error during reorder children priority", true), $r["id"]);
                }
            }
        }

        $this->Transaction->commit() ;
        $this->userInfoMessage(__("Section saved", true)." - ".$this->data["title"]);
        $this->eventInfo("section [". $this->data["title"]."] saved");
    }

    function delete() {
        if(empty($this->data['id'])) {
            throw new BeditaException(__("No data", true));
        }
        $ot_id = $this->BEObject->field("object_type_id", array("BEObject.id" => $this->data['id']));
        switch ($ot_id) {
            case Configure::read("objectTypes.area.id"):
                $this->deleteArea();
                break;

            case Configure::read("objectTypes.section.id"):
                $this->deleteSection();
                break;
        }
    }

    /**
     * Export section objects to a specific file format
     */
    public function export() {
        $this->autoRender = false;
        $formData = $this->data;
        // $this->params['form'];
        if (empty($formData['type'])) {
            throw new BeditaException(__('No valid export filter has been selected', true));
        }
        if(empty($formData['filename'])) {
            throw new BeditaException(__('No valid export filename has been selected', true));
        }
        $filterClass = $formData['type'];
        $filterModel = ClassRegistry::init($filterClass);
        $objects = array($formData['id']);
        $options = array(
            'filename' => $formData['filename']
        );
        if (!empty($formData['options'])) {
            $options = array_merge($options,$formData['options']);
        }
        ini_set('max_execution_time', 600); // 10 minutes
        $result = @$filterModel->export($objects, $options);

        Configure::write('debug', 0);
        // TODO: optimizations!!! use cake tools
        header('Content-Description: File Transfer');
        header("Content-Type: {$result['contentType']}");
        header("Content-Disposition: attachment; filename={$formData['filename']}");
        header('Content-Transfer-Encoding: binary');
        header('Expires: 0');
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        header('Pragma: public');
        header("Content-Length: {$result['size']}");
        ob_clean();
        flush();
        echo $result['content'];
        exit;
    }

    /**
     * Import objects from file in current section
     */
    public function import() {
        $this->checkWriteModulePermission();

        $this->Transaction->begin();
        if (!empty($this->params['form']['Filedata']['name'])) {
            unset($this->data['url']);
            $this->params['form']['forceupload'] = true;
            $streamId = $this->BeUploadToObj->upload($this->data);
        } elseif (!empty($this->data['url'])) {
            $streamId = $this->BeUploadToObj->uploadFromURL($this->data);
        }
        $stream = ClassRegistry::init('Stream');
        $path = $stream->field('uri', array('id' => $streamId));

        if ($this->data['type'] !== 'auto') {
            $filterClass = Configure::read("filters.import.{$this->data['type']}");
        } else {
            // search matching mime types
            $mimeType = $stream->field('mime_type', array('id' => $streamId));
            $filterClass = Configure::read("filters.mime.{$mimeType}.import");
        }

        $this->Section->id = $this->data['sectionId'];
        if (!empty($filterClass)) {
            $filterModel = ClassRegistry::init($filterClass);
            $options = array('sectionId' => $this->data['sectionId']);
            $result = $filterModel->import(Configure::read('mediaRoot') . $path, $options);
            $this->userInfoMessage(__('Objects imported', true) . ': ' . $result['objects']);
            $this->eventInfo("{$result['objects']} objects imported in section {$this->Section->id} from {$path}");
        } else {
            $this->userErrorMessage(__('No import filter found for file type', true) . ' : ' . $mimeType);
            $this->eventError('Import filter not found for type ' . $mimeType);
        }
        if (!$this->BeFileHandler->del($streamId)) {
            throw new BeditaException(__('Error deleting object: ', true) . $streamId);
        }
        $this->Transaction->commit();
    }

    private function deleteArea() {
        $this->checkWriteModulePermission();
        $objectsListDeleted = $this->deleteObjects("Area");
        $this->userInfoMessage(__("Area deleted", true)." - ".$objectsListDeleted);
        $this->eventInfo("area [". $objectsListDeleted."] deleted");
    }

    private function deleteSection() {
        $this->checkWriteModulePermission();
        $objectsListDeleted = $this->deleteObjects("Section");
        $this->userInfoMessage(__("Section deleted", true)." - ".$objectsListDeleted);
        $this->eventInfo("section [". $objectsListDeleted."] deleted");
    }

     /**
      * Return associative array representing publications/sections tree
      *
      * @param unknown_type $data
      * @param unknown_type $tree
      */
    private function _getTreeFromPOST(&$data, &$tree) {
        $tree = array() ;
        $IDs  = array() ;
        // Creating subtrees
        $arr = preg_split("/;/", $data) ;
        for($i = 0 ; $i < count($arr) ; $i++) {
            $item = array() ;
            $tmp = split(" ", $arr[$i] ) ;
            foreach($tmp as $val) {
                $t  = split("=", $val) ;
                $item[$t[0]] = ($t[1] == "null") ? null : ((integer)$t[1]) ;
            }
            $IDs[$item["id"]]               = $item ;
            $IDs[$item["id"]]["children"]   = array() ;
        }
        // Creating the tree
        foreach ($IDs as $id => $item) {
            if(!isset($item["parent"])) {
                $tree[] = $item ;
                $IDs[$id] = &$tree[count($tree)-1] ;
            }
            if(isset($IDs[$item["parent"]])) {
                $IDs[$item["parent"]]["children"][] = $item ;
                $IDs[$id] = &$IDs[$item["parent"]]["children"][count($IDs[$item["parent"]]["children"])-1] ;
            }
        }
        unset($IDs) ;
    }

    public function categories() {
        $this->showCategories($this->Section);
    }
    
    protected function forward($action, $result) {
        $moduleRedirect = array(
            'saveArea' => array(
                'OK'    => "/areas/view/{$this->Area->id}",
                'ERROR' => $this->referer()
            ),
            'saveSection'   =>  array(
                'OK'    => "/areas/view/{$this->Section->id}",
                'ERROR' => $this->referer()
            ),
            'delete'    =>  array(
                'OK'    => '/areas',
                'ERROR' => $this->referer()
            ),
            'deleteSection' =>  array(
                'OK'    => '/areas',
                'ERROR' => $this->referer()
            ),
            'deleteArea'    =>  array(
                'OK'    => '/areas',
                'ERROR' => $this->referer()
            ),
            'import'    =>  array(
                'OK'    => "/areas/view/{$this->Section->id}",
                'ERROR' => $this->referer()
            ),
            'export'    =>  array(
                'OK'    => $this->referer(),
                'ERROR' => $this->referer()
            ),
        );
        return $this->moduleForward($action, $result, $moduleRedirect);
    }
}
BEdita API doc | 4-cactus API documentation generated by ApiGen