当前位置: 首页>>代码示例>>PHP>>正文


PHP class_module_system_module类代码示例

本文整理汇总了PHP中class_module_system_module的典型用法代码示例。如果您正苦于以下问题:PHP class_module_system_module类的具体用法?PHP class_module_system_module怎么用?PHP class_module_system_module使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了class_module_system_module类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handleEvent

 /**
  * Searches for tags assigned to the systemid to be deleted.
  *
  * @param string $strEventName
  * @param array $arrArguments
  *
  * @return bool
  */
 public function handleEvent($strEventName, array $arrArguments)
 {
     //unwrap arguments
     list($strSystemid, $strSourceClass) = $arrArguments;
     $bitReturn = true;
     if ($strSourceClass == "class_module_tags_tag" && class_module_system_module::getModuleByName("tags") != null) {
         //delete matching favorites
         class_orm_base::setObjHandleLogicalDeletedGlobal(class_orm_deletedhandling_enum::INCLUDED());
         $arrFavorites = class_module_tags_favorite::getAllFavoritesForTag($strSystemid);
         foreach ($arrFavorites as $objOneFavorite) {
             if ($strEventName == class_system_eventidentifier::EVENT_SYSTEM_RECORDDELETED_LOGICALLY) {
                 $bitReturn = $bitReturn && $objOneFavorite->deleteObject();
             }
             if ($strEventName == class_system_eventidentifier::EVENT_SYSTEM_RECORDDELETED) {
                 $bitReturn = $bitReturn && $objOneFavorite->deleteObjectFromDatabase();
                 $bitReturn = $bitReturn && class_carrier::getInstance()->getObjDB()->_pQuery("DELETE FROM " . _dbprefix_ . "tags_member WHERE tags_tagid=?", array($strSystemid));
             }
         }
         class_orm_base::setObjHandleLogicalDeletedGlobal(class_orm_deletedhandling_enum::EXCLUDED());
     }
     //delete memberships. Fire a plain query, faster then searching.
     if ($strEventName == class_system_eventidentifier::EVENT_SYSTEM_RECORDDELETED) {
         $bitReturn = $bitReturn && class_carrier::getInstance()->getObjDB()->_pQuery("DELETE FROM " . _dbprefix_ . "tags_member WHERE tags_systemid=?", array($strSystemid));
     }
     return $bitReturn;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:34,代码来源:class_module_tags_recorddeletedlistener.php

示例2: install

 public function install()
 {
     $strReturn = "";
     if (class_module_system_module::getModuleByName("mediamanager") == null) {
         return "Mediamanger not installed, skipping element\n";
     }
     //Table for page-element
     $strReturn .= "Installing downloads-element table...\n";
     $objManager = new class_orm_schemamanager();
     $objManager->createTable("class_element_downloads_admin");
     //Register the element
     $strReturn .= "Registering downloads-element...\n";
     if (class_module_system_module::getModuleByName("pages") !== null && class_module_pages_element::getElement("downloads") == null) {
         $objElement = new class_module_pages_element();
         $objElement->setStrName("downloads");
         $objElement->setStrClassAdmin("class_element_downloads_admin.php");
         $objElement->setStrClassPortal("class_element_downloads_portal.php");
         $objElement->setIntCachetime(3600);
         $objElement->setIntRepeat(1);
         $objElement->setStrVersion($this->objMetadata->getStrVersion());
         $objElement->updateObjectToDb();
         $strReturn .= "Element registered...\n";
     } else {
         $strReturn .= "Element already installed or pages module not installed!...\n";
     }
     return $strReturn;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:27,代码来源:class_installer_element_downloads.php

示例3: actionBrowserChooser

 /**
  * @return string
  * @autoTestable
  * @permissions view
  */
 protected function actionBrowserChooser()
 {
     $strReturn = "";
     if ($this->getParam("CKEditorFuncNum") != "") {
         $strReturn .= "<script type=\"text/javascript\">window.opener.KAJONA.admin.folderview.selectCallbackCKEditorFuncNum = " . (int) $this->getParam("CKEditorFuncNum") . ";</script>";
     }
     $intCounter = 1;
     $strReturn .= $this->objToolkit->listHeader();
     if (class_module_system_module::getModuleByName("pages") !== null) {
         $strAction = $this->objToolkit->listButton(class_link::getLinkAdmin("pages", "pagesFolderBrowser", "&pages=1&form_element=" . $this->getParam("form_element") . "&bit_link=1", $this->getLang("wysiwygPagesBrowser"), $this->getLang("wysiwygPagesBrowser"), "icon_folderActionOpen"));
         $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygPagesBrowser"), "", $strAction, $intCounter++);
     }
     $strRepoId = class_module_system_setting::getConfigValue("_mediamanager_default_filesrepoid_");
     if (validateSystemid($strRepoId) && class_module_system_module::getModuleByName("mediamanager") !== null && class_objectfactory::getInstance()->getObject($strRepoId) !== null) {
         $strAction = $this->objToolkit->listButton(class_link::getLinkAdmin("mediamanager", "folderContentFolderviewMode", "&systemid=" . $strRepoId . "&form_element=" . $this->getParam("form_element") . "&bit_link=1", $this->getLang("wysiwygFilesBrowser"), $this->getLang("wysiwygFilesBrowser"), "icon_folderActionOpen"));
         $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygFilesBrowser"), "", $strAction, $intCounter++);
     }
     $strRepoId = class_module_system_setting::getConfigValue("_mediamanager_default_imagesrepoid_");
     if (validateSystemid($strRepoId) && class_module_system_module::getModuleByName("mediamanager") !== null && class_objectfactory::getInstance()->getObject($strRepoId) !== null) {
         $strAction = $this->objToolkit->listButton(class_link::getLinkAdmin("mediamanager", "folderContentFolderviewMode", "&systemid=" . $strRepoId . "&form_element=" . $this->getParam("form_element") . "&bit_link=1", $this->getLang("wysiwygImagesBrowser"), $this->getLang("wysiwygImagesBrowser"), "icon_folderActionOpen"));
         $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygImagesBrowser"), "", $strAction, $intCounter++);
     }
     if (class_module_system_module::getModuleByName("mediamanager") !== null) {
         $strAction = $this->objToolkit->listButton(class_link::getLinkAdmin("mediamanager", "folderContentFolderviewMode", "&form_element=" . $this->getParam("form_element") . "&bit_link=1", $this->getLang("wysiwygRepoBrowser"), $this->getLang("wysiwygRepoBrowser"), "icon_folderActionOpen"));
         $strReturn .= $this->objToolkit->genericAdminList(generateSystemid(), $this->getLang("wysiwygRepoBrowser"), "", $strAction, $intCounter++);
     }
     $strReturn .= $this->objToolkit->listFooter();
     return $strReturn;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:34,代码来源:class_module_folderview_admin.php

示例4: testObjectValidator

 /**
  * Checks if the references of the source object is correctly set after validation
  */
 public function testObjectValidator()
 {
     $objModule = class_module_system_module::getModuleByName("news");
     if ($objModule == null) {
         return;
     }
     $objNews = new class_module_news_news();
     $objForm = new class_admin_formgenerator("news", $objNews);
     $objForm->generateFieldsFromObject();
     $objSourceObjectBefore = $objForm->getObjSourceobject();
     $arrFieldsBefore = $objForm->getArrFields();
     $objForm->validateForm();
     $objSourceObjectAfter = $objForm->getObjSourceobject();
     $arrFieldsAfter = $objForm->getArrFields();
     //Now check if the reference to the source object before validation is the same as after
     foreach ($objForm->getArrFields() as $intIndex => $objField) {
         if ($arrFieldsAfter != null) {
             $this->assertTrue($arrFieldsBefore[$intIndex]->getObjSourceObject() === $arrFieldsAfter[$intIndex]->getObjSourceObject());
             if ($arrFieldsBefore[$intIndex]->getObjSourceObject() != null) {
                 $this->assertTrue($arrFieldsBefore[$intIndex]->getObjSourceObject() === $objSourceObjectBefore);
                 $this->assertTrue($arrFieldsBefore[$intIndex]->getObjSourceObject() === $objSourceObjectAfter);
             }
             if ($arrFieldsAfter[$intIndex]->getObjSourceObject() != null) {
                 $this->assertTrue($arrFieldsAfter[$intIndex]->getObjSourceObject() === $objSourceObjectBefore);
                 $this->assertTrue($arrFieldsAfter[$intIndex]->getObjSourceObject() === $objSourceObjectAfter);
             }
         }
     }
     $this->assertTrue($objSourceObjectAfter === $objSourceObjectBefore);
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:33,代码来源:test_objectValidatorTest.php

示例5: testFileSync

 public function testFileSync()
 {
     echo "test mediamanager...\n";
     if (class_module_system_module::getModuleByName("samplecontent") == null || !is_file(_realpath_ . "/files/images/samples/IMG_3000.JPG")) {
         return;
     }
     $objFilesystem = new class_filesystem();
     $objFilesystem->folderCreate(_filespath_ . "/images/autotest");
     $objFilesystem->fileCopy(_filespath_ . "/images/samples/IMG_3000.JPG", _filespath_ . "/images/autotest/IMG_3000.jpg");
     $objFilesystem->fileCopy(_filespath_ . "/images/samples/IMG_3000.JPG", _filespath_ . "/images/autotest/IMG_3000.png");
     $objFilesystem->fileCopy(_filespath_ . "/images/samples/IMG_3000.JPG", _filespath_ . "/images/autotest/PA021805.JPG");
     $objFilesystem->fileCopy(_filespath_ . "/images/samples/IMG_3000.JPG", _filespath_ . "/images/autotest/test.txt");
     $objRepo = new class_module_mediamanager_repo();
     $objRepo->setStrPath(_filespath_ . "/images/autotest");
     $objRepo->setStrTitle("autotest repo");
     $objRepo->setStrViewFilter(".jpg,.png");
     $objRepo->updateObjectToDb();
     $objRepo->syncRepo();
     $arrFiles = class_module_mediamanager_file::loadFilesDB($objRepo->getSystemid());
     $this->assertEquals(3, count($arrFiles));
     foreach ($arrFiles as $objOneFile) {
         $objOneFile->deleteObjectFromDatabase();
     }
     $objRepo->deleteObjectFromDatabase();
     $arrFiles = $objFilesystem->getFilelist(_filespath_ . "/images/autotest");
     $this->assertEquals(1, count($arrFiles));
     $this->assertEquals("test.txt", array_values($arrFiles)[0]);
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:28,代码来源:test_mediamanagerTest.php

示例6: generateFieldsFromObject

 /**
  * @inheritDoc
  */
 public function generateFieldsFromObject()
 {
     parent::generateFieldsFromObject();
     $objNews = $this->getObjSourceobject();
     if ($objNews->getSystemid() != class_module_system_module::getModuleByName("news")->getSystemid()) {
         //search the languages maintained
         $objLanguageManager = class_module_languages_languageset::getLanguagesetForSystemid($objNews->getSystemid());
         if ($objLanguageManager != null) {
             $arrMaintained = $objLanguageManager->getArrLanguageSet();
             $arrDD = array();
             foreach ($arrMaintained as $strLanguageId => $strSystemid) {
                 $objLanguage = new class_module_languages_language($strLanguageId);
                 $arrDD[$strSystemid] = $this->getLang("lang_" . $objLanguage->getStrName(), "languages");
             }
             class_module_languages_admin::enableLanguageSwitch();
             class_module_languages_admin::setArrLanguageSwitchEntries($arrDD);
             class_module_languages_admin::setStrOnChangeHandler("window.location='" . class_link::getLinkAdminHref("news", "editNews") . (class_module_system_setting::getConfigValue("_system_mod_rewrite_") == "true" ? "?" : "&") . "systemid='+this.value+'&pe=" . class_carrier::getInstance()->getParam("pe") . "';");
             class_module_languages_admin::setStrActiveKey($objNews->getSystemid());
         }
     }
     $arrCats = class_module_news_category::getObjectList();
     if (count($arrCats) > 0) {
         $arrKeyValues = array();
         /** @var class_module_news_category $objOneCat */
         foreach ($arrCats as $objOneCat) {
             $arrKeyValues[$objOneCat->getSystemid()] = $objOneCat->getStrDisplayName();
         }
         $this->getField("cats")->setStrLabel($this->getLang("commons_categories"))->setArrKeyValues($arrKeyValues);
     }
     if (class_module_system_setting::getConfigValue("_news_news_datetime_") == "true") {
         $this->addField(new class_formentry_datetime($this->getStrFormname(), "objDateStart", $objNews), "datestart")->setBitMandatory(true)->setStrLabel($this->getLang("form_news_datestart"));
         $this->addField(new class_formentry_datetime($this->getStrFormname(), "objDateEnd", $objNews), "dateend")->setStrLabel($this->getLang("form_news_dateend"));
         $this->addField(new class_formentry_datetime($this->getStrFormname(), "objDateSpecial", $objNews), "datespecial")->setStrLabel($this->getLang("form_news_datespecial"));
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:38,代码来源:class_module_news_news_formgenerator.php

示例7: executeTask

 /**
  * @see interface_admin_systemtast::executeTask()
  * @return string
  */
 public function executeTask()
 {
     if (!class_module_system_module::getModuleByName("stats")->rightEdit()) {
         return $this->getLang("commons_error_permissions");
     }
     $objBrowscap = new class_browscap();
     $objBrowscap->updateBrowscap();
     return $this->objToolkit->getTextRow($this->getLang("browscapupdate_end"));
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:13,代码来源:class_systemtask_stats_browscapupdate.php

示例8: loadData

 /**
  * Loads the navigation-class and passes control
  *
  * @return string
  */
 public function loadData()
 {
     $strReturn = "";
     $objNaviModule = class_module_system_module::getModuleByName("navigation");
     if ($objNaviModule != null) {
         $objNavigation = $objNaviModule->getPortalInstanceOfConcreteModule($this->arrElementData);
         $strReturn = $objNavigation->action();
     }
     return $strReturn;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:15,代码来源:class_element_navigation_portal.php

示例9: executeTask

 /**
  * @see interface_admin_systemtask::executeTask()
  * @return string
  */
 public function executeTask()
 {
     if (!class_module_system_module::getModuleByName("workflows")->rightRight1()) {
         return $this->getLang("commons_error_permissions");
     }
     $objWorkflowController = new class_workflows_controller();
     $objWorkflowController->scheduleWorkflows();
     $objWorkflowController->runWorkflows();
     return "";
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:14,代码来源:class_systemtask_workflows.php

示例10: executeTask

 /**
  * @see interface_admin_systemtast::executeTask()
  * @return string
  */
 public function executeTask()
 {
     if (!class_module_system_module::getModuleByName("stats")->rightEdit()) {
         return $this->getLang("commons_error_permissions");
     }
     $strReturn = "";
     $objWorker = new class_module_stats_worker("");
     $objWorker->hostnameLookupResetHostnames();
     $strReturn .= $this->objToolkit->getTextRow($this->getLang("worker_lookupReset_end"));
     return $strReturn;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:15,代码来源:class_systemtask_stats_hostnamelookupreset.php

示例11: testObjectIndexerPerformance

 public function testObjectIndexerPerformance()
 {
     if (class_module_system_module::getModuleByName("news") === null) {
         return;
     }
     $arrNewsIds = array();
     echo "Indexing without deferred indexer...\n";
     class_module_system_changelog::$bitChangelogEnabled = false;
     $intTimeStart = microtime(true);
     $intQueriesStart = class_db::getInstance()->getNumber();
     for ($intI = 0; $intI < 15; $intI++) {
         $objNews = new class_module_news_news();
         $objNews->setStrTitle("demo 1");
         $objNews->setStrIntro("intro demo news");
         $objNews->setStrText("text demo news");
         $objNews->updateObjectToDb();
         $arrNewsIds[] = $objNews->getSystemid();
     }
     echo "Queries pre indexing: ", class_db::getInstance()->getNumber() - $intQueriesStart . " \n";
     $objHandler = new class_module_search_request_endprocessinglistener();
     $objHandler->handleEvent(class_system_eventidentifier::EVENT_SYSTEM_REQUEST_AFTERCONTENTSEND, array());
     $intTimeEnd = microtime(true);
     $time = $intTimeEnd - $intTimeStart;
     echo "Object updates: ", sprintf('%f', $time), " sec.\n";
     echo "Queries total: ", class_db::getInstance()->getNumber() - $intQueriesStart . " \n";
     echo "\nIndexing with deferred indexer...\n";
     $objConfig = class_module_system_setting::getConfigByName("_search_deferred_indexer_");
     $objConfig->setStrValue("true");
     $objConfig->updateObjectToDb();
     $intTimeStart = microtime(true);
     $intQueriesStart = class_db::getInstance()->getNumber();
     for ($intI = 0; $intI < 15; $intI++) {
         $objNews = new class_module_news_news();
         $objNews->setStrTitle("demo 1");
         $objNews->setStrIntro("intro demo news");
         $objNews->setStrText("text demo news");
         $objNews->updateObjectToDb();
         $arrNewsIds[] = $objNews->getSystemid();
     }
     echo "Queries pre indexing: ", class_db::getInstance()->getNumber() - $intQueriesStart . " \n";
     echo "Triggering queue update event...\n";
     $objHandler = new class_module_search_request_endprocessinglistener();
     $objHandler->handleEvent(class_system_eventidentifier::EVENT_SYSTEM_REQUEST_AFTERCONTENTSEND, array());
     $intTimeEnd = microtime(true);
     $time = $intTimeEnd - $intTimeStart;
     echo "Object updates: ", sprintf('%f', $time), " sec.\n";
     echo "Queries total: ", class_db::getInstance()->getNumber() - $intQueriesStart . " \n";
     $objConfig = class_module_system_setting::getConfigByName("_search_deferred_indexer_");
     $objConfig->setStrValue("false");
     $objConfig->updateObjectToDb();
     foreach ($arrNewsIds as $strNewsId) {
         class_objectfactory::getInstance()->getObject($strNewsId)->deleteObjectFromDatabase();
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:54,代码来源:test_searchDeferredIndexerTest.php

示例12: onFistLogin

 /**
  * This callback is triggered on a users' first login into the system.
  * You may use this method to install a widget as a default widget to
  * a users dashboard.
  *
  * @param string $strUserid
  *
  * @return bool
  */
 public function onFistLogin($strUserid)
 {
     if (class_module_system_module::getModuleByName("system") !== null && class_module_system_aspect::getAspectByName("content") !== null) {
         $objDashboard = new class_module_dashboard_widget();
         $objDashboard->setStrColumn("column2");
         $objDashboard->setStrUser($strUserid);
         $objDashboard->setStrClass(__CLASS__);
         return $objDashboard->updateObjectToDb(class_module_dashboard_widget::getWidgetsRootNodeForUser($strUserid, class_module_system_aspect::getAspectByName("content")->getSystemid()));
     }
     return true;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:20,代码来源:class_adminwidget_updatecheck.php

示例13: executeTask

 /**
  * @see interface_admin_systemtask::executeTask()
  * @return string
  */
 public function executeTask()
 {
     if (!class_module_system_module::getModuleByName("system")->rightRight2()) {
         return $this->getLang("commons_error_permissions");
     }
     if (class_carrier::getInstance()->getObjDB()->importDb($this->getParam("dbImportFile"))) {
         return $this->objToolkit->getTextRow($this->getLang("systemtask_dbimport_success"));
     } else {
         return $this->objToolkit->getTextRow($this->getLang("systemtask_dbimport_error"));
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:15,代码来源:class_systemtask_dbimport.php

示例14: remove

 /**
  * Removes the elements / modules handled by the current installer.
  * Use the reference param to add a human readable logging.
  *
  * @param string &$strReturn
  *
  * @return bool
  */
 public function remove(&$strReturn)
 {
     //delete the module-node
     $strReturn .= "Deleting the module-registration...\n";
     $objModule = class_module_system_module::getModuleByName($this->objMetadata->getStrTitle(), true);
     if (!$objModule->deleteObjectFromDatabase()) {
         $strReturn .= "Error deleting module, aborting.\n";
         return false;
     }
     return true;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:19,代码来源:class_installer_jsonapi.php

示例15: __construct

 /**
  * Constructor doing the usual setup things
  */
 private function __construct()
 {
     $this->objDb = class_carrier::getInstance()->getObjDb();
     $this->objSession = class_carrier::getInstance()->getObjSession();
     if (count($this->objDb->getTables()) > 0) {
         $objModule = class_module_system_module::getModuleByName("system");
         if ($objModule !== null && version_compare($objModule->getStrVersion(), "4.3.1") < 0) {
             $this->bitChangelog = false;
         }
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:14,代码来源:class_rights.php


注:本文中的class_module_system_module类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。