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

Classes

  • cApiAction
  • cApiActionCollection
  • cApiActionlog
  • cApiActionlogCollection
  • cApiArea
  • cApiAreaCollection
  • cApiArticle
  • cApiArticleCollection
  • cApiArticleLanguage
  • cApiArticleLanguageCollection
  • cApiArticleLanguageVersion
  • cApiArticleLanguageVersionCollection
  • cApiArticleSpecification
  • cApiArticleSpecificationCollection
  • cApiCategory
  • cApiCategoryArticle
  • cApiCategoryArticleCollection
  • cApiCategoryCollection
  • cApiCategoryLanguage
  • cApiCategoryLanguageCollection
  • cApiCategoryTree
  • cApiCategoryTreeCollection
  • cApiClient
  • cApiClientCollection
  • cApiClientLanguage
  • cApiClientLanguageCollection
  • cApiCommunication
  • cApiCommunicationCollection
  • cApiContainer
  • cApiContainerCollection
  • cApiContainerConfiguration
  • cApiContainerConfigurationCollection
  • cApiContent
  • cApiContentCollection
  • cApiContentVersion
  • cApiContentVersionCollection
  • 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
  • cApiMetaTagVersion
  • cApiMetaTagVersionCollection
  • 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
  • cApiUserPasswordRequest
  • cApiUserPasswordRequestCollection
  • cApiUserProperty
  • cApiUserPropertyCollection
  • NoteCollection
  • NoteItem
  • TODOCollection
  • TODOItem
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: 
  3: /**
  4:  * This file contains the actionlog collection and item class.
  5:  *
  6:  * @package          Core
  7:  * @subpackage       GenericDB_Model
  8:  * @author           Murat Purc <murat@purc.de>
  9:  * @copyright        four for business AG <www.4fb.de>
 10:  * @license          http://www.contenido.org/license/LIZENZ.txt
 11:  * @link             http://www.4fb.de
 12:  * @link             http://www.contenido.org
 13:  */
 14: 
 15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 16: 
 17: /**
 18:  * Actionlog collection.
 19:  *
 20:  * @package    Core
 21:  * @subpackage GenericDB_Model
 22:  */
 23: class cApiActionlogCollection extends ItemCollection {
 24: 
 25:     /**
 26:      * Constructor to create an instance of this class.
 27:      *
 28:      * Tables user, client, language, action & category_article
 29:      * are allowed as join partners.
 30:      */
 31:     public function __construct() {
 32:         global $cfg;
 33:         parent::__construct($cfg['tab']['actionlog'], 'idlog');
 34:         $this->_setItemClass('cApiActionlog');
 35: 
 36:         // set the join partners so that joins can be used via link() method
 37:         $this->_setJoinPartner('cApiUserCollection');
 38:         $this->_setJoinPartner('cApiClientCollection');
 39:         $this->_setJoinPartner('cApiLanguageCollection');
 40:         $this->_setJoinPartner('cApiActionCollection');
 41:         $this->_setJoinPartner('cApiCategoryArticleCollection');
 42:     }
 43: 
 44:     /**
 45:      * Creates an actionlog item.
 46:      *
 47:      * @param string $userId
 48:      *         User id
 49:      * @param int $idclient
 50:      * @param int $idlang
 51:      * @param int $idaction
 52:      * @param int $idcatart
 53:      * @param string $logtimestamp [optional]
 54:      * @return cApiActionlog
 55:      */
 56:     public function create($userId, $idclient, $idlang, $idaction, $idcatart, $logtimestamp = '') {
 57:         $item = $this->createNewItem();
 58: 
 59:         if (empty($logtimestamp)) {
 60:             $logtimestamp = date('Y-m-d H:i:s');
 61:         }
 62: 
 63:         $item->set('user_id', $userId);
 64:         $item->set('idclient', $idclient);
 65:         $item->set('idlang', $idlang);
 66:         $item->set('idaction', $idaction);
 67:         $item->set('idcatart', $idcatart);
 68:         $item->set('logtimestamp', $logtimestamp);
 69: 
 70:         $item->store();
 71: 
 72:         return $item;
 73:     }
 74: 
 75: }
 76: 
 77: /**
 78:  * Actionlog item.
 79:  *
 80:  * @package    Core
 81:  * @subpackage GenericDB_Model
 82:  */
 83: class cApiActionlog extends Item {
 84: 
 85:     /**
 86:      * Constructor to create an instance of this class.
 87:      *
 88:      * @param mixed $mId [optional]
 89:      *         Specifies the ID of item to load
 90:      */
 91:     public function __construct($mId = false) {
 92:         global $cfg;
 93:         parent::__construct($cfg['tab']['actionlog'], 'idlog');
 94:         $this->setFilters(array(), array());
 95:         if ($mId !== false) {
 96:             $this->loadByPrimaryKey($mId);
 97:         }
 98:     }
 99: 
100:     /**
101:      * Userdefined setter for action log fields.
102:      *
103:      * @param string $name
104:      * @param mixed $value
105:      * @param bool $bSafe [optional]
106:      *         Flag to run defined inFilter on passed value
107:      * @return bool
108:      */
109:     public function setField($name, $value, $bSafe = true) {
110:         switch ($name) {
111:             case 'idclient':
112:                 $value = (int) $value;
113:                 break;
114:             case 'idlang':
115:                 $value = (int) $value;
116:                 break;
117:             case 'idaction':
118:                 $value = (int) $value;
119:                 break;
120:             case 'idcatart':
121:                 $value = (int) $value;
122:                 break;
123:         }
124: 
125:         return parent::setField($name, $value, $bSafe);
126:     }
127: 
128: }
129: 
CMS CONTENIDO 4.9.11 API documentation generated by ApiGen 2.8.0