Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
ContentSourceModule Class Reference

Public Member Functions

 getContentSource ()
 getContent ($path)
 init ()

Public Attributes

 $sourceSettings
 $sourceClass
 $homePage
 $startPageFallback = 'index.html'
 $startPageDynamic = true
 $localizedAttributeName = 'startpageurl_'
 $cacheTime

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.

Module for working with File System Content Renderer and Dynamic Content Renderer. Configuration example: 'contentSource' => array( 'class' => 'site.common.modules.contentSource.ContentSourceModule', 'sourceSettings' => array( 'DynamicContentSource' => array( 'storageFolder' => '/var/www/gPortal/DCR' ), 'FileSystemContentSource' => array( 'sourceFolder' => '/var/www/gPortal/FSCR' ), ), 'sourceClass' => 'DynamicContentSource' )

Definition at line 25 of file ContentSourceModule.php.

Member Function Documentation

ContentSourceModule::getContent (   $path)

Get static resource content. For example images, css, js

Parameters
string$pathcontent path
Returns
Content content

Definition at line 102 of file ContentSourceModule.php.

References getContentSource().

{
return $this->getContentSource()->getContent($path);
}
ContentSourceModule::getContentSource ( )

Get object which represents Content Source

Returns
ContentSource

Definition at line 83 of file ContentSourceModule.php.

Referenced by getContent().

{
if (!$this->_contentSource) {
$settings = $this->sourceSettings[$this->sourceClass];
$settings['class'] = $this->sourceClass;
$this->_contentSource = Yii::createComponent($settings);
$this->_contentSource->init();
}
return $this->_contentSource;
}
ContentSourceModule::init ( )

Module initial function

Returns
void

Definition at line 112 of file ContentSourceModule.php.

{
$this->setImport(
array(
'contentSource.components.*'
)
);
}

Member Data Documentation

ContentSourceModule::$localizedAttributeName = 'startpageurl_'

Name of content attribute for locale $localizedAttributeName . $locale

string

Definition at line 63 of file ContentSourceModule.php.

ContentSourceModule::$startPageDynamic = true

Method of displaying startpage to user. Can take following values: false - redirect user to the page true - (no redirect - just display/include the page without changing the URL)

string

Definition at line 55 of file ContentSourceModule.php.

ContentSourceModule::$startPageFallback = 'index.html'

This value is used when startpage for some folder doesnt exists

string

Definition at line 46 of file ContentSourceModule.php.


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