Cheetah
Public Member Functions | Public Attributes | List of all members
ChWsbTwigTemplate Class Reference
Inheritance diagram for ChWsbTwigTemplate:
ChWsbModuleTemplate ChWsbTemplate ChAvaTemplate ChChatPlusTemplate ChEventsTemplate ChGroupsTemplate ChGSearchTemplate ChH5avTemplate ChOAuthTemplate ChProfilerTemplate ChRuTemplate ChSMTPTemplate ChStoreTemplate ChWmapTemplate ChZIPTemplate

Public Member Functions

 __construct (&$oConfig, &$oDb, $sRootPath=CH_DIRECTORY_PATH_ROOT, $sRootUrl=CH_WSB_URL_ROOT)
 
 addCssAdmin ($sName)
 
 addJsAdmin ($sName)
 
 parseHtmlByName ($sName, $aVariables, $mixedKeyWrapperHtml=null, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 pageCode ($sTitle, $isDesignBox=true, $isWrap=true)
 
 pageCodeWithHeader ($sTitle, $sHeader='', $isDesignBox=true, $isWrap=true)
 
 adminBlock ($sContent, $sTitle, $aMenu=array(), $sBottomItems='', $iIndex=1)
 
 pageCodeAdmin ($sTitle)
 
 parseTags ($s)
 
 parseCategories ($s)
 
 displayAccessDenied ()
 
 displayNoData ()
 
 displayErrorOccured ()
 
 displayPageNotFound ()
 
 displayMsg ($s, $isTranslate=false)
 
- Public Member Functions inherited from ChWsbModuleTemplate
 addAdminCss ($mixedFiles, $bDynamic=false)
 
 addAdminJs ($mixedFiles, $bDynamic=false)
 
 pageCodeAdminStart ()
 
 pageStart ()
 
 pageEnd ($isGetContent=true)
 
 _parseAnything ($s, $sDiv, $sLinkStart, $sClassName='')
 
- Public Member Functions inherited from ChWsbTemplate
 __construct ($sRootPath=CH_DIRECTORY_PATH_ROOT, $sRootUrl=CH_WSB_URL_ROOT)
 
 loadTemplates ()
 
 init ()
 
 addLocation ($sKey, $sLocationPath, $sLocationUrl)
 
 addDynamicLocation ($sLocationPath, $sLocationUrl)
 
 removeLocation ($sKey)
 
 addLocationJs ($sKey, $sLocationPath, $sLocationUrl)
 
 addDynamicLocationJs ($sLocationPath, $sLocationUrl)
 
 removeLocationJs ($sKey)
 
 getCodeKey ()
 
 getCode ()
 
 getPageWidth ()
 
 setPageWidth ($sWidth)
 
 setPageTitle ($sTitle)
 
 setPageMainBoxTitle ($sTitle)
 
 setPageDescription ($sDescription)
 
 addJsOption ($mixedName)
 
 addJsTranslation ($mixedKey)
 
 addJsImage ($aImages)
 
 addJsIcon ($aIcons)
 
 addCssStyle ($sName, $sContent)
 
 addPageKeywords ($mixedKeywords, $sDevider=',')
 
 setOpenGraphInfo ($a, $sNamespace='og')
 
 getMetaInfo ()
 
 getTemplate ($sName)
 
 getIconUrl ($sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 getIconPath ($sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 getImageUrl ($sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 getImagePath ($sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 getCssUrl ($sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 getCssPath ($sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 getHtml ($sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 parseHtmlByContent ($sContent, $aVariables, $mixedKeyWrapperHtml=null)
 
 parseHtmlByTemplateName ($sName, $aVariables, $mixedKeyWrapperHtml=null)
 
 parsePageByName ($sName, $aVariables)
 
 parseSystemKey ($sKey, $mixedKeyWrapperHtml=null)
 
 getTemplatesCacheObject ()
 
 getCached ($sName, &$aVariables, $mixedKeyWrapperHtml=null, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH, $bEvaluate=true)
 
 addJs ($mixedFiles, $bDynamic=false)
 
 addJsSystem ($mixedFiles)
 
 deleteJs ($mixedFiles)
 
 deleteJsSystem ($mixedFiles)
 
 _compileJs ($sAbsolutePath, &$aIncluded)
 
 _wrapInTagJs ($sFile)
 
 _wrapInTagJsCode ($sCode)
 
 addCss ($mixedFiles, $bDynamic=false)
 
 addCssAsync ($mixedFiles)
 
 includeCssAsync ()
 
 addCssSystem ($mixedFiles)
 
 deleteCss ($mixedFiles)
 
 deleteCssSystem ($mixedFiles)
 
 _compileCss ($sAbsolutePath, &$aIncluded)
 
 _minifyCss ($s)
 
 _wrapInTagCss ($sFile)
 
 _wrapInTagCssCode ($sCode)
 
 includeCssStyles ()
 
 includeFiles ($sType, $bSystem=false)
 
 _includeFiles ($sType, &$aFiles)
 
 _processFiles ($sType, $sAction, $mixedFiles, $bDynamic=false, $bSystem=false)
 
 _parseContent ($sContent, $aVariables, $mixedKeyWrapperHtml=null)
 
 _compileContent ($sContent, $aVarName, $iVarDepth, $aVarValues, $mixedKeyWrapperHtml=null)
 
 _getAbsoluteLocation ($sType, $sFolder, $sName, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
 
 _getAbsoluteLocationJs ($sType, $sName)
 
 _getAbsoluteLocationCss ($sType, $sName)
 
 _getInlineData ($sType, $sName, $sCheckIn)
 
 _getCacheFileName ($sType, $sAbsolutePath)
 
 _getKeyWrappers ($mixedKeyWrapperHtml)
 
 _processJsTranslations ()
 
 _processJsOptions ()
 
 _processJsImages ()
 
 _getLoaderUrl ($sType, $sName)
 
 processInjection ($iPageIndex, $sKey, $sValue="")
 
 addInjection ($sKey, $sType, $sData, $iReplace=0)
 

Public Attributes

 $_iPageIndex = 13
 
 $_oMain = null
 
- Public Attributes inherited from ChWsbModuleTemplate
 $_oDb
 
 $_oConfig
 
 $_bObStarted = 0
 
- Public Attributes inherited from ChWsbTemplate
 $_sPrefix
 
 $_sRootPath
 
 $_sRootUrl
 
 $_sInjectionsTable
 
 $_sInjectionsCache
 
 $_sCode
 
 $_sCodeKey
 
 $_sKeyWrapperHtml
 
 $_sFolderHtml
 
 $_sFolderCss
 
 $_sFolderImages
 
 $_sFolderIcons
 
 $_aTemplates
 
 $_aLocations
 
 $_aLocationsJs
 
 $_bCacheEnable
 
 $_sCacheFolderUrl
 
 $_sCachePublicFolderUrl
 
 $_sCachePublicFolderPath
 
 $_sCacheFilePrefix
 
 $_bImagesInline
 
 $_iImagesMaxSize
 
 $_bCssCache
 
 $_bCssArchive
 
 $_sCssCachePrefix
 
 $_bJsCache
 
 $_bJsArchive
 
 $_sJsCachePrefix
 

Additional Inherited Members

- Static Public Member Functions inherited from ChWsbTemplate
static _callbackParseUrl ($sPath, $aMatches)
 

Detailed Description

Base template class for modules like events/groups/store

Definition at line 13 of file ChWsbTwigTemplate.php.

Constructor & Destructor Documentation

◆ __construct()

ChWsbTwigTemplate::__construct ( $oConfig,
$oDb,
  $sRootPath = CH_DIRECTORY_PATH_ROOT,
  $sRootUrl = CH_WSB_URL_ROOT 
)

Reimplemented from ChWsbModuleTemplate.

Definition at line 18 of file ChWsbTwigTemplate.php.

Member Function Documentation

◆ addCssAdmin()

ChWsbTwigTemplate::addCssAdmin (   $sName)

Definition at line 28 of file ChWsbTwigTemplate.php.

◆ addJsAdmin()

ChWsbTwigTemplate::addJsAdmin (   $sName)

Definition at line 35 of file ChWsbTwigTemplate.php.

◆ adminBlock()

ChWsbTwigTemplate::adminBlock (   $sContent,
  $sTitle,
  $aMenu = array(),
  $sBottomItems = '',
  $iIndex = 1 
)

Definition at line 97 of file ChWsbTwigTemplate.php.

◆ displayAccessDenied()

ChWsbTwigTemplate::displayAccessDenied ( )

Static functions to display pages with errors, messages and so on.

Reimplemented from ChWsbTemplate.

Definition at line 132 of file ChWsbTwigTemplate.php.

◆ displayErrorOccured()

ChWsbTwigTemplate::displayErrorOccured ( )

Reimplemented from ChWsbTemplate.

Definition at line 146 of file ChWsbTwigTemplate.php.

◆ displayMsg()

ChWsbTwigTemplate::displayMsg (   $s,
  $isTranslate = false 
)

Reimplemented from ChWsbTemplate.

Definition at line 161 of file ChWsbTwigTemplate.php.

◆ displayNoData()

ChWsbTwigTemplate::displayNoData ( )

Reimplemented from ChWsbTemplate.

Definition at line 139 of file ChWsbTwigTemplate.php.

◆ displayPageNotFound()

ChWsbTwigTemplate::displayPageNotFound ( )

Reimplemented from ChWsbTemplate.

Definition at line 153 of file ChWsbTwigTemplate.php.

◆ pageCode()

ChWsbTwigTemplate::pageCode (   $sTitle,
  $isDesignBox = true,
  $isWrap = true 
)

Definition at line 49 of file ChWsbTwigTemplate.php.

◆ pageCodeAdmin()

ChWsbTwigTemplate::pageCodeAdmin (   $sTitle)

Reimplemented from ChWsbModuleTemplate.

Definition at line 102 of file ChWsbTwigTemplate.php.

◆ pageCodeWithHeader()

ChWsbTwigTemplate::pageCodeWithHeader (   $sTitle,
  $sHeader = '',
  $isDesignBox = true,
  $isWrap = true 
)

Definition at line 72 of file ChWsbTwigTemplate.php.

◆ parseCategories()

ChWsbTwigTemplate::parseCategories (   $s)

Definition at line 124 of file ChWsbTwigTemplate.php.

◆ parseHtmlByName()

ChWsbTwigTemplate::parseHtmlByName (   $sName,
  $aVariables,
  $mixedKeyWrapperHtml = null,
  $sCheckIn = CH_WSB_TEMPLATE_CHECK_IN_BOTH 
)

Parse HTML template. Search for the template with accordance to it's file name.

See also
allows to use cache.
Parameters
string$sName- HTML file name.
array$aVariables- key/value pairs. key should be the same as template's key, but without prefix and postfix.
mixed$mixedKeyWrapperHtml- key wrapper(string value if left and right parts are the same, array(left, right) otherwise).
string$sCheckInwhere the content would be searched(base, template, both)
Returns
string the result of operation.

Reimplemented from ChWsbTemplate.

Definition at line 42 of file ChWsbTwigTemplate.php.

◆ parseTags()

ChWsbTwigTemplate::parseTags (   $s)

Definition at line 119 of file ChWsbTwigTemplate.php.

Member Data Documentation

◆ $_iPageIndex

ChWsbTwigTemplate::$_iPageIndex = 13

Definition at line 15 of file ChWsbTwigTemplate.php.

◆ $_oMain

ChWsbTwigTemplate::$_oMain = null

Definition at line 16 of file ChWsbTwigTemplate.php.


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