CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 1.3 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 1.3
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Classes

  • AclBase
  • AclBehavior
  • AclComponent
  • AclNode
  • AclShell
  • Aco
  • AcoAction
  • AjaxHelper
  • ApcEngine
  • ApiShell
  • App
  • AppController
  • AppHelper
  • AppModel
  • Aro
  • AuthComponent
  • BakeShell
  • BakeTask
  • BehaviorCollection
  • Cache
  • CacheEngine
  • CacheHelper
  • CakeErrorController
  • CakeLog
  • CakeRoute
  • CakeSchema
  • CakeSession
  • CakeSocket
  • ClassRegistry
  • Component
  • Configure
  • ConnectionManager
  • ConsoleShell
  • ContainableBehavior
  • Controller
  • ControllerTask
  • CookieComponent
  • DataSource
  • DbAcl
  • DbConfigTask
  • DboMssql
  • DboMysql
  • DboMysqlBase
  • DboMysqli
  • DboOracle
  • DboPostgres
  • DboSource
  • DboSqlite
  • Debugger
  • EmailComponent
  • ErrorHandler
  • ExtractTask
  • File
  • FileEngine
  • FileLog
  • FixtureTask
  • Folder
  • FormHelper
  • Helper
  • HtmlHelper
  • HttpSocket
  • I18n
  • I18nModel
  • I18nShell
  • Inflector
  • IniAcl
  • JavascriptHelper
  • JqueryEngineHelper
  • JsBaseEngineHelper
  • JsHelper
  • L10n
  • MagicDb
  • MagicFileResource
  • MediaView
  • MemcacheEngine
  • Model
  • ModelBehavior
  • ModelTask
  • MootoolsEngineHelper
  • Multibyte
  • NumberHelper
  • Object
  • Overloadable
  • Overloadable2
  • PagesController
  • PaginatorHelper
  • Permission
  • PluginShortRoute
  • PluginTask
  • ProjectTask
  • PrototypeEngineHelper
  • RequestHandlerComponent
  • Router
  • RssHelper
  • Sanitize
  • Scaffold
  • ScaffoldView
  • SchemaShell
  • Security
  • SecurityComponent
  • SessionComponent
  • SessionHelper
  • Set
  • Shell
  • String
  • TemplateTask
  • TestSuiteShell
  • TestTask
  • TextHelper
  • ThemeView
  • TimeHelper
  • TranslateBehavior
  • TreeBehavior
  • Validation
  • View
  • ViewTask
  • XcacheEngine
  • Xml
  • XmlElement
  • XmlHelper
  • XmlManager
  • XmlNode
  • XmlTextNode

Functions

  • mb_encode_mimeheader
  • mb_stripos
  • mb_stristr
  • mb_strlen
  • mb_strpos
  • mb_strrchr
  • mb_strrichr
  • mb_strripos
  • mb_strrpos
  • mb_strstr
  • mb_strtolower
  • mb_strtoupper
  • mb_substr
  • mb_substr_count
 1: <?php
 2: /**
 3:  * A custom view class that is used for themeing
 4:  *
 5:  * PHP versions 4 and 5
 6:  *
 7:  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 8:  * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 9:  *
10:  * Licensed under The MIT License
11:  * Redistributions of files must retain the above copyright notice.
12:  *
13:  * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
14:  * @link          http://cakephp.org CakePHP(tm) Project
15:  * @package       cake
16:  * @subpackage    cake.cake.libs.view
17:  * @since         CakePHP(tm) v 0.10.0.1076
18:  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
19:  */
20: 
21: /**
22:  * Theme view class
23:  *
24:  * Allows the creation of multiple themes to be used in an app. Theme views are regular view files
25:  * that can provide unique HTML and static assets.  If theme views are not found for the current view
26:  * the default app view files will be used. You can set `$this->theme` and `$this->view = 'Theme'` 
27:  * in your Controller to use the ThemeView.
28:  *
29:  * Example of theme path with `$this->theme = 'super_hot';` Would be `app/views/themed/super_hot/posts`
30:  *
31:  * @package       cake
32:  * @subpackage    cake.cake.libs.view
33:  */
34: class ThemeView extends View {
35: /**
36:  * Constructor for ThemeView sets $this->theme.
37:  *
38:  * @param Controller $controller Controller object to be rendered.
39:  * @param boolean $register Should the view be registered in the registry.
40:  */
41:     function __construct(&$controller, $register = true) {
42:         parent::__construct($controller, $register);
43:         $this->theme =& $controller->theme;
44:     }
45: 
46: /**
47:  * Return all possible paths to find view files in order
48:  *
49:  * @param string $plugin The name of the plugin views are being found for.
50:  * @param boolean $cached Set to true to force dir scan.
51:  * @return array paths
52:  * @access protected
53:  * @todo Make theme path building respect $cached parameter.
54:  */
55:     function _paths($plugin = null, $cached = true) {
56:         $paths = parent::_paths($plugin, $cached);
57:         $themePaths = array();
58: 
59:         if (!empty($this->theme)) {
60:             $count = count($paths);
61:             for ($i = 0; $i < $count; $i++) {
62:                 if (strpos($paths[$i], DS . 'plugins' . DS) === false
63:                     && strpos($paths[$i], DS . 'libs' . DS . 'view') === false) {
64:                         if ($plugin) {
65:                             $themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS . 'plugins' . DS . $plugin . DS;
66:                         }
67:                         $themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS;
68:                     }
69:             }
70:             $paths = array_merge($themePaths, $paths);
71:         }
72:         return $paths;
73:     }
74: }
75: 
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs