Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cCodeGeneratorAbstract
  • cCodeGeneratorFactory
  • cCodeGeneratorStandard
  • cContentTypeAbstract
  • cContentTypeAbstractTabbed
  • cContentTypeDate
  • cContentTypeFilelist
  • cContentTypeHead
  • cContentTypeHtml
  • cContentTypeHtmlhead
  • cContentTypeImg
  • cContentTypeImgdescr
  • cContentTypeImgeditor
  • cContentTypeLink
  • cContentTypeLinkdescr
  • cContentTypeLinkeditor
  • cContentTypeLinktarget
  • cContentTypeTeaser
  • cContentTypeText
  • cTypeGenerator
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the cContentTypeImgdescr class.
 4:  *
 5:  * @package Core
 6:  * @subpackage ContentType
 7:  * @version SVN Revision $Rev:$
 8:  *
 9:  * @author Simon Sprankel
10:  * @copyright four for business AG <www.4fb.de>
11:  * @license http://www.contenido.org/license/LIZENZ.txt
12:  * @link http://www.4fb.de
13:  * @link http://www.contenido.org
14:  */
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: /**
19:  * Content type CMS_IMGDESCR which displays the description of the selected
20:  * image.
21:  *
22:  * @package Core
23:  * @subpackage ContentType
24:  */
25: class cContentTypeImgdescr extends cContentTypeImgeditor {
26: 
27:     /**
28:      * Initialises class attributes and handles store events.
29:      *
30:      * @param string $rawSettings the raw settings in an XML structure or as
31:      *        plaintext
32:      * @param int $id ID of the content type, e.g. 3 if CMS_DATE[3] is
33:      *        used
34:      * @param array $contentTypes array containing the values of all content
35:      *        types
36:      */
37:     public function __construct($rawSettings, $id, array $contentTypes) {
38:         // there are no raw settings here, because the image description is now
39:         // saved in con_upl_meta
40:         // so compute the appropriate raw settings and call the parent
41:         // constructor with them
42: 
43:         if (!cXmlBase::isValidXML($rawSettings)) {
44:             $rawSettings = $this->_getRawSettings("CMS_IMGEDITOR", $id, $contentTypes);
45:         }
46: 
47:         parent::__construct($rawSettings, $id, $contentTypes);
48:     }
49: 
50:     /**
51:      * Generates the code which should be shown if this content type is shown in
52:      * the frontend.
53:      *
54:      * @return string escaped HTML code which sould be shown if content type is
55:      *         shown in frontend
56:      */
57:     public function generateViewCode() {
58:         return $this->_encodeForOutput($this->_description);
59:     }
60: 
61:     /**
62:      * Generates the code which should be shown if this content type is edited.
63:      *
64:      * @return string escaped HTML code which should be shown if content type is
65:      *         edited
66:      */
67:     public function generateEditCode() {
68:         return $this->generateViewCode();
69:     }
70: 
71: }
CMS CONTENIDO 4.9.3 API documentation generated by ApiGen 2.8.0