Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
SCBaseController Class Reference
Inheritance diagram for SCBaseController:
BaseController ItemController LanguageTestController ShoppingcartController

Public Member Functions

 csrfProtect ()
 checkSumCmp ($model)
- Public Member Functions inherited from BaseController
 getClient ()
 getAssetsPath ()
 getViewFile ($viewName)
 getJs ($path)
 renderMail ($view, $title=null, $data, $return=true)
 redirect ($url, $terminate=true, $statusCode=302)
 createWidget ($className, $properties=array())

Public Attributes

 $breadcrumbs = array()
- Public Attributes inherited from BaseController
 $layout = '//layouts/gportal'
 $mailLayout = '//layouts/mail'

Additional Inherited Members

- Protected Member Functions inherited from BaseController
 beforeAction ($action)

Detailed Description

Gentics Portal.Node PHP Author & Copyright (c) by Gentics Software GmbH sales.nosp@m.@gen.nosp@m.tics..nosp@m.com http://www.gentics.com Licenses can be found in the LICENSE.txt file in the root-folder of this installation You must not use this software without a valid license agreement.

SCBaseController controller class file.

Definition at line 12 of file SCBaseController.php.

Member Function Documentation

SCBaseController::checkSumCmp (   $model)

Function checks matches the checksums tokens

Returns
boolean returns true if the checksums are matched

Definition at line 36 of file SCBaseController.php.

{
return EncryptHelper::getItemChecksum($model)==$_POST['checksum'];
}
SCBaseController::csrfProtect ( )

Function checks matches the csrf tokens

Returns
boolean returns true if the tokens are matched

Definition at line 22 of file SCBaseController.php.

{
if(Yii::app()->request->isPostRequest && Yii::app()->request->enableCsrfValidation){
if(strcmp($_POST['YII_CSRF_TOKEN'], Yii::app()->request->getCsrfToken()) !== 0 ){
throw new CHttpException(403);
return false;
}
}
return true;
}

The documentation for this class was generated from the following file: