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 Plugin Manager Relations recipient class.
  4:  *
  5:  * @package Plugin
  6:  * @subpackage PluginManager
  7:  * @version SVN Revision $Rev:$
  8:  *
  9:  * @author Frederic Schneider
 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:  * Plugin Manager Relations recipient class.
 20:  *
 21:  * @package     Plugin
 22:  * @subpackage  PluginManager
 23:  * @author Frederic Schneider
 24:  */
 25: class PimPluginRelationsCollection extends ItemCollection {
 26: 
 27:     /**
 28:      * Constructor Function
 29:      *
 30:      * @param none
 31:      */
 32:     public function __construct() {
 33:         global $cfg;
 34:         parent::__construct($cfg['tab']['plugins_rel'], 'idpluginrelation');
 35:         $this->_setItemClass('PimPluginRelations');
 36:     }
 37: 
 38:     /**
 39:      * Create a new plugin
 40:      *
 41:      * @param $idItem int Is equivalent to idarea or idnavm
 42:      * @param $idPlugin int Plugin Id
 43:      * @param $type string Relation to tables *_area and *_nav_main
 44:      */
 45:     public function create($idItem, $idPlugin, $type) {
 46: 
 47:         // create a new entry
 48:         $item = $this->createNewItem();
 49:         $item->set('iditem', $idItem);
 50:         $item->set('idplugin', $idPlugin);
 51:         $item->set('type', $type);
 52: 
 53:         $item->store();
 54: 
 55:         return $item;
 56:     }
 57: 
 58: }
 59: 
 60: /**
 61:  * Single Plugin Manager Relations Item
 62:  */
 63: class PimPluginRelations extends Item {
 64: 
 65:     /**
 66:      * @var string Error storage
 67:      */
 68:     protected $_sError;
 69: 
 70:     /**
 71:      * Constructor Function
 72:      *
 73:      * @param  mixed  $id  Specifies the id of item to load
 74:      */
 75:     public function __construct($id = false) {
 76:         global $cfg;
 77:         parent::__construct($cfg['tab']['plugins_rel'], 'idpluginrelation');
 78:         $this->_sError = '';
 79:         if ($id !== false) {
 80:             $this->loadByPrimaryKey($id);
 81:         }
 82:     }
 83:     
 84:     /**
 85:      * Userdefined setter for pim relations fields.
 86:      *
 87:      * @param string $name
 88:      * @param mixed $value
 89:      * @param bool $bSafe Flag to run defined inFilter on passed value
 90:      */
 91:     public function setField($name, $value, $bSafe = true) {
 92:         switch ($name) {
 93:             case 'iditem':
 94:                 $value = (int) $value;
 95:                 break;
 96:             case 'idplugin':
 97:                 $value = (int) $value;
 98:                 break;
 99:         }
100: 
101:         return parent::setField($name, $value, $bSafe);
102:     }
103: 
104: }
105: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen