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

  • ActionActiveForm
  • ActionActiveFormBase
  • CActiveForm
  • CalendarEventActiveForm
  • CallActiveForm
  • CClipWidget
  • CContentDecorator
  • CFilterWidget
  • CFlexWidget
  • CHtmlPurifier
  • CInputWidget
  • CMarkdown
  • CMaskedTextField
  • CMultiFileUpload
  • COutputCache
  • COutputProcessor
  • CStarRating
  • CTabView
  • CTextHighlighter
  • CTreeView
  • CWidget
  • EventActiveForm
  • MobileActiveForm
  • NoteActiveForm
  • TimeActiveForm
  • X2ActiveForm
  • X2StarRating
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * CClipWidget class file.
 4:  *
 5:  * @author Qiang Xue <qiang.xue@gmail.com>
 6:  * @link http://www.yiiframework.com/
 7:  * @copyright 2008-2013 Yii Software LLC
 8:  * @license http://www.yiiframework.com/license/
 9:  */
10: 
11: /**
12:  * CClipWidget records its content and makes it available elsewhere.
13:  *
14:  * Content rendered between its {@link init()} and {@link run()} calls are saved
15:  * as a clip in the controller. The clip is named after the widget ID.
16:  *
17:  * See {@link CBaseController::beginClip} and {@link CBaseController::endClip}
18:  * for a shortcut usage of CClipWidget.
19:  *
20:  * @author Qiang Xue <qiang.xue@gmail.com>
21:  * @package system.web.widgets
22:  * @since 1.0
23:  */
24: class CClipWidget extends CWidget
25: {
26:     /**
27:      * @var boolean whether to render the clip content in place. Defaults to false,
28:      * meaning the captured clip will not be displayed.
29:      */
30:     public $renderClip=false;
31: 
32:     /**
33:      * Starts recording a clip.
34:      */
35:     public function init()
36:     {
37:         ob_start();
38:         ob_implicit_flush(false);
39:     }
40: 
41:     /**
42:      * Ends recording a clip.
43:      * This method stops output buffering and saves the rendering result as a named clip in the controller.
44:      */
45:     public function run()
46:     {
47:         $clip=ob_get_clean();
48:         if($this->renderClip)
49:             echo $clip;
50:         $this->getController()->getClips()->add($this->getId(),$clip);
51:     }
52: }
API documentation generated by ApiGen 2.8.0