Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CPradoViewRenderer
  • CViewRenderer
  • Overview
  • Package
  • Class
  • Tree

Class CPradoViewRenderer

CPradoViewRenderer implements a view renderer that allows users to use a template syntax similar to PRADO templates.

To use CPradoViewRenderer, configure it as an application component named "viewRenderer" in the application configuration:

array(
    'components'=>array(
        ......
        'viewRenderer'=>array(
            'class'=>'CPradoViewRenderer',
        ),
    ),
)

CPradoViewRenderer allows you to write view files with the following syntax:

// PHP tags:
<%= expression %>
// <?php echo expression ?>
<% statement %>
// <?php statement ?></li>

// component tags:
<com:WigetClass name1="value1" name2='value2' name3={value3} >
// <?php $this->beginWidget('WigetClass',
// array('name1'=>"value1", 'name2'=>'value2', 'name3'=>value3)); ?>
</com:WigetClass >
// <?php $this->endWidget('WigetClass'); ?>
<com:WigetClass name1="value1" name2='value2' name3={value3} />
// <?php $this->widget('WigetClass',
// array('name1'=>"value1", 'name2'=>'value2', 'name3'=>value3)); ?>

// cache tags:
<cache:fragmentID name1="value1" name2='value2' name3={value3} >
// <?php if($this->beginCache('fragmentID',
// array('name1'=>"value1", 'name2'=>'value2', 'name3'=>value3))): ?>
</cache:fragmentID >
// <?php $this->endCache('fragmentID'); endif; ?>

// clip tags:
<clip:clipID >
// <?php $this->beginClip('clipID'); ?>
</clip:clipID >
// <?php $this->endClip('clipID'); ?>

// comment tags:
<!--- comments --->
// the whole tag will be stripped off
CComponent
Extended by CApplicationComponent implements IApplicationComponent
Extended by CViewRenderer implements IViewRenderer
Extended by CPradoViewRenderer
Package: system\web\renderers
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Steve Heyns http://customgothic.com/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/renderers/CPradoViewRenderer.php
Methods summary
protected
# generateViewFile( string $sourceFile, string $viewFile )

Parses the source view file and saves the results as another file. This method is required by the parent class.

Parses the source view file and saves the results as another file. This method is required by the parent class.

Parameters

$sourceFile
string
$sourceFile the source view file path
$viewFile
string
$viewFile the resulting view file path
Methods inherited from CViewRenderer
getViewFile(), renderFile()
Methods inherited from CApplicationComponent
getIsInitialized(), init()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties inherited from CViewRenderer
$fileExtension, $filePermission, $useRuntimePath
Properties inherited from CApplicationComponent
$behaviors
Magic properties inherited from CApplicationComponent
$isInitialized
API documentation generated by ApiGen 2.8.0