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 frame file and item class.
  4:  *
  5:  * @package Core
  6:  * @subpackage GenericDB_Model
  7:  * @version SVN Revision $Rev:$
  8:  *
  9:  * @author Timo Hummel
 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:  * Frame file collection
 20:  *
 21:  * @package Core
 22:  * @subpackage GenericDB_Model
 23:  */
 24: class cApiFrameFileCollection extends ItemCollection {
 25: 
 26:     /**
 27:      * Constructor
 28:      */
 29:     public function __construct() {
 30:         global $cfg;
 31:         parent::__construct($cfg['tab']['framefiles'], 'idframefile');
 32:         $this->_setItemClass('cApiFrameFile');
 33: 
 34:         // set the join partners so that joins can be used via link() method
 35:         $this->_setJoinPartner('cApiAreaCollection');
 36:         $this->_setJoinPartner('cApiFileCollection');
 37:     }
 38: 
 39:     /**
 40:      * Creates a frame file item
 41:      * @param string $area
 42:      * @param int $idframe
 43:      * @param int $idfile
 44:      * @return cApiFrameFile
 45:      */
 46:     public function create($area, $idframe, $idfile) {
 47:         $item = $this->createNewItem();
 48: 
 49:         if (is_string($area)) {
 50:             $c = new cApiArea();
 51:             $c->loadBy('name', $area);
 52: 
 53:             if ($c->isLoaded()) {
 54:                 $area = $c->get('idarea');
 55:             } else {
 56:                 $area = 0;
 57:                 cWarning(__FILE__, __LINE__, "Could not resolve area [$area] passed to method [create], assuming 0");
 58:             }
 59:         }
 60: 
 61:         $item->set('idarea', $area);
 62:         $item->set('idfile', $idfile);
 63:         $item->set('idframe', $idframe);
 64: 
 65:         $item->store();
 66: 
 67:         return $item;
 68:     }
 69: }
 70: 
 71: /**
 72:  * Frame file item
 73:  *
 74:  * @package Core
 75:  * @subpackage GenericDB_Model
 76:  */
 77: class cApiFrameFile extends Item {
 78: 
 79:     /**
 80:      * Constructor Function
 81:      *
 82:      * @param mixed $mId Specifies the ID of item to load
 83:      */
 84:     public function __construct($mId = false) {
 85:         global $cfg;
 86:         parent::__construct($cfg['tab']['framefiles'], 'idframefile');
 87:         $this->setFilters(array(
 88:             'addslashes'
 89:         ), array(
 90:             'stripslashes'
 91:         ));
 92:         if ($mId !== false) {
 93:             $this->loadByPrimaryKey($mId);
 94:         }
 95:     }
 96: 
 97:     /**
 98:      * Userdefined setter for framefile fields.
 99:      *
100:      * @param string $name
101:      * @param mixed $value
102:      * @param bool $bSafe Flag to run defined inFilter on passed value
103:      */
104:     public function setField($name, $value, $bSafe = true) {
105:         switch ($name) {
106:             case 'idarea':
107:                 $value = (int) $value;
108:                 break;
109:             case 'idfile':
110:                 $value = (int) $value;
111:                 break;
112:             case 'idframe':
113:                 $value = (int) $value;
114:                 break;
115:         }
116: 
117:         return parent::setField($name, $value, $bSafe);
118:     }
119: 
120: }
121: 
CMS CONTENIDO 4.9.5 API documentation generated by ApiGen 2.8.0