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

  • cApiAction
  • cApiActionCollection
  • cApiActionlog
  • cApiActionlogCollection
  • cApiArea
  • cApiAreaCollection
  • cApiArticle
  • cApiArticleCollection
  • cApiArticleLanguage
  • cApiArticleLanguageCollection
  • cApiArticleSpecification
  • cApiArticleSpecificationCollection
  • cApiCategory
  • cApiCategoryArticle
  • cApiCategoryArticleCollection
  • cApiCategoryCollection
  • cApiCategoryLanguage
  • cApiCategoryLanguageCollection
  • cApiCategoryTree
  • cApiCategoryTreeCollection
  • cApiClient
  • cApiClientCollection
  • cApiClientLanguage
  • cApiClientLanguageCollection
  • cApiCommunication
  • cApiCommunicationCollection
  • cApiContainer
  • cApiContainerCollection
  • cApiContainerConfiguration
  • cApiContainerConfigurationCollection
  • cApiContent
  • cApiContentCollection
  • cApiDbfs
  • cApiDbfsCollection
  • cApiFile
  • cApiFileCollection
  • cApiFileInformation
  • cApiFileInformationCollection
  • cApiFrameFile
  • cApiFrameFileCollection
  • cApiFrontendGroup
  • cApiFrontendGroupCollection
  • cApiFrontendGroupMember
  • cApiFrontendGroupMemberCollection
  • cApiFrontendPermission
  • cApiFrontendPermissionCollection
  • cApiFrontendUser
  • cApiFrontendUserCollection
  • cApiGroup
  • cApiGroupCollection
  • cApiGroupMember
  • cApiGroupMemberCollection
  • cApiGroupProperty
  • cApiGroupPropertyCollection
  • cApiInUse
  • cApiInUseCollection
  • cApiIso3166
  • cApiIso3166Collection
  • cApiIso6392
  • cApiIso6392Collection
  • cApiKeyword
  • cApiKeywordCollection
  • cApiLanguage
  • cApiLanguageCollection
  • cApiLayout
  • cApiLayoutCollection
  • cApiMailLog
  • cApiMailLogCollection
  • cApiMailLogSuccess
  • cApiMailLogSuccessCollection
  • cApiMetaTag
  • cApiMetaTagCollection
  • cApiMetaType
  • cApiMetaTypeCollection
  • cApiModule
  • cApiModuleCollection
  • cApiNavMain
  • cApiNavMainCollection
  • cApiNavSub
  • cApiNavSubCollection
  • cApiOnlineUser
  • cApiOnlineUserCollection
  • cApiPathresolveCache
  • cApiPathresolveCacheCollection
  • cApiProperty
  • cApiPropertyCollection
  • cApiRight
  • cApiRightCollection
  • cApiSearchTracking
  • cApiSearchTrackingCollection
  • cApiStat
  • cApiStatCollection
  • cApiSystemProperty
  • cApiSystemPropertyCollection
  • cApiTemplate
  • cApiTemplateCollection
  • cApiTemplateConfiguration
  • cApiTemplateConfigurationCollection
  • cApiType
  • cApiTypeCollection
  • cApiUpload
  • cApiUploadCollection
  • cApiUploadMeta
  • cApiUploadMetaCollection
  • cApiUser
  • cApiUserCollection
  • cApiUserProperty
  • cApiUserPropertyCollection
  • NoteCollection
  • NoteItem
  • TODOCollection
  • TODOItem
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the meta type collection and item class.
 4:  *
 5:  * @package          Core
 6:  * @subpackage       GenericDB_Model
 7:  * @version          SVN Revision $Rev$
 8:  *
 9:  * @author           Murat Purc <murat@purc.de>
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:  * Metatype collection
20:  *
21:  * @package Core
22:  * @subpackage GenericDB_Model
23:  */
24: class cApiMetaTypeCollection extends ItemCollection {
25: 
26:     /**
27:      * Constructor
28:      */
29:     public function __construct() {
30:         global $cfg;
31:         parent::__construct($cfg['tab']['meta_type'], 'idmetatype');
32:         $this->_setItemClass('cApiMetaType');
33:     }
34: 
35:     /**
36:      * Creates a meta type entry.
37:      *
38:      * @param string $metatype
39:      * @param string $fieldtype
40:      * @param int $maxlength
41:      * @param string $fieldname
42:      * @return cApiMetaType
43:      */
44:     public function create($metatype, $fieldtype, $maxlength, $fieldname) {
45:         $oItem = $this->createNewItem();
46: 
47:         $oItem->set('metatype', $metatype);
48:         $oItem->set('fieldtype', $fieldtype);
49:         $oItem->set('maxlength', $maxlength);
50:         $oItem->set('fieldname', $fieldname);
51:         $oItem->store();
52: 
53:         return $oItem;
54:     }
55: 
56: }
57: 
58: /**
59:  * Metatype item
60:  *
61:  * @package Core
62:  * @subpackage GenericDB_Model
63:  */
64: class cApiMetaType extends Item {
65: 
66:     /**
67:      * Constructor Function
68:      *
69:      * @param mixed $mId Specifies the ID of item to load
70:      */
71:     public function __construct($mId = false) {
72:         global $cfg;
73:         parent::__construct($cfg['tab']['meta_type'], 'idmetatype');
74:         $this->setFilters(array(), array());
75:         if ($mId !== false) {
76:             $this->loadByPrimaryKey($mId);
77:         }
78:     }
79: 
80:     /**
81:      * Userdefined setter for article language fields.
82:      *
83:      * @param string $name
84:      * @param mixed $value
85:      * @param bool $bSafe Flag to run defined inFilter on passed value
86:      */
87:     public function setField($name, $value, $bSafe = true) {
88:         if ('maxlength' == $name) {
89:             $value = (int) $value;
90:         }
91: 
92:         return parent::setField($name, $value, $bSafe);
93:     }
94: 
95: }
96: 
CMS CONTENIDO 4.9.5 API documentation generated by ApiGen 2.8.0