Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • 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
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
  1: <?php
  2: /**
  3:  * This file contains the meta tag 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:  * Metatag collection
 20:  *
 21:  * @package Core
 22:  * @subpackage GenericDB_Model
 23:  */
 24: class cApiMetaTagCollection extends ItemCollection {
 25: 
 26:     /**
 27:      * Constructor
 28:      */
 29:     public function __construct() {
 30:         global $cfg;
 31:         parent::__construct($cfg['tab']['meta_tag'], 'idmetatag');
 32:         $this->_setItemClass('cApiMetaTag');
 33: 
 34:         // set the join partners so that joins can be used via link() method
 35:         $this->_setJoinPartner('cApiArticleLanguageCollection');
 36:         $this->_setJoinPartner('cApiMetaTypeCollection');
 37:     }
 38: 
 39:     /**
 40:      * Creates a meta tag entry.
 41:      *
 42:      * @param int $iIdArtLang
 43:      * @param int $iIdMetaType
 44:      * @param string $sMetaValue
 45:      * @return cApiMetaTag
 46:      */
 47:     public function create($iIdArtLang, $iIdMetaType, $sMetaValue) {
 48:         $oItem = $this->createNewItem();
 49: 
 50:         $oItem->set('idartlang', $iIdArtLang, false);
 51:         $oItem->set('idmetatype', $iIdMetaType, false);
 52:         $oItem->set('metavalue', $sMetaValue, false);
 53:         $oItem->store();
 54: 
 55:         return $oItem;
 56:     }
 57: 
 58:     /**
 59:      * Returns a meta tag entry by article language and meta type.
 60:      *
 61:      * @param int $iIdArtLang
 62:      * @param int $iIdMetaType
 63:      * @return cApiMetaTag|NULL
 64:      */
 65:     public function fetchByArtLangAndMetaType($iIdArtLang, $iIdMetaType) {
 66:         $this->select('idartlang=' . (int) $iIdArtLang . ' AND idmetatype=' . (int) $iIdMetaType);
 67:         return $this->next();
 68:     }
 69: 
 70: }
 71: 
 72: /**
 73:  * Metatag item
 74:  *
 75:  * @package Core
 76:  * @subpackage GenericDB_Model
 77:  */
 78: class cApiMetaTag extends Item {
 79: 
 80:     /**
 81:      * Constructor Function
 82:      *
 83:      * @param mixed $mId Specifies the ID of item to load
 84:      */
 85:     public function __construct($mId = false) {
 86:         global $cfg;
 87:         parent::__construct($cfg['tab']['meta_tag'], 'idmetatag');
 88:         $this->setFilters(array(), array());
 89:         if ($mId !== false) {
 90:             $this->loadByPrimaryKey($mId);
 91:         }
 92:     }
 93: 
 94:     /**
 95:      * Updates meta value of an entry.
 96:      *
 97:      * @param string $sMetaValue
 98:      * @return bool
 99:      */
100:     public function updateMetaValue($sMetaValue) {
101:         $this->set('metavalue', $sMetaValue, false);
102:         return $this->store();
103:     }
104: 
105:     /**
106:      * Userdefined setter for meta tag fields.
107:      *
108:      * @param string $name
109:      * @param mixed $value
110:      * @param bool $bSafe Flag to run defined inFilter on passed value
111:      */
112:     public function setField($name, $value, $bSafe = true) {
113:         switch ($name) {
114:             case 'idartlang':
115:                 $value = (int) $value;
116:                 break;
117:             case 'idmetatype':
118:                 $value = (int) $value;
119:                 break;
120:         }
121: 
122:         return parent::setField($name, $value, $bSafe);
123:     }
124: 
125: }
126: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen