當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Registry::getActionLogger方法代碼示例

本文整理匯總了PHP中Seitenbau\Registry::getActionLogger方法的典型用法代碼示例。如果您正苦於以下問題:PHP Registry::getActionLogger方法的具體用法?PHP Registry::getActionLogger怎麽用?PHP Registry::getActionLogger使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Seitenbau\Registry的用法示例。


在下文中一共展示了Registry::getActionLogger方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: buildwebsiteAction

 public function buildwebsiteAction()
 {
     $validatedRequest = $this->getValidatedRequest('Builder', 'BuildWebsite');
     $this->getBusiness()->checkUserRights('buildWebsite', array('websiteId' => $validatedRequest->getWebsiteId()));
     $build = $this->getBusiness()->buildWebsite($validatedRequest->getWebsiteId(), $validatedRequest->getComment());
     Registry::getActionLogger()->logAction(BuilderBusiness::BUILDER_BUILD_ACTION, array('websiteId' => $validatedRequest->getWebsiteId(), 'id' => $build->getId()));
     $this->responseData->setData(new Response\Build($build));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:8,代碼來源:BuilderController.php

示例2: editAction

 public function editAction()
 {
     $validatedRequest = $this->getValidatedRequest('TemplateSnippet', 'Edit');
     // Darf das TemplateSnippet bearbeitet werden?
     $check = array('id' => $validatedRequest->getId(), 'websiteId' => $validatedRequest->getWebsiteId());
     $this->getBusiness()->checkUserRights('edit', $check);
     $columnsValues = array('websiteid' => $validatedRequest->getWebsiteId(), 'name' => $validatedRequest->getName(), 'description' => $validatedRequest->getDescription(), 'category' => $validatedRequest->getCategory(), 'content' => $validatedRequest->getContent());
     $templateSnippet = $this->getBusiness()->update($validatedRequest->getWebsiteId(), $validatedRequest->getId(), $columnsValues);
     Registry::getActionLogger()->logAction(TemplateSnippetBusiness::TEMPLATESNIPPET_EDIT_ACTION, array('websiteId' => $validatedRequest->getWebsiteId(), 'id' => $templateSnippet->getId(), 'name' => $templateSnippet->getName()));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:10,代碼來源:TemplatesnippetController.php

示例3: loginAction

 public function loginAction()
 {
     $validatedRequest = $this->getValidatedRequest('User', 'Login');
     $this->getBusiness()->login($validatedRequest->getUsername(), $validatedRequest->getPassword());
     Registry::getActionLogger()->logAction(UserBusiness::USER_LOGIN_ACTION, array());
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:6,代碼來源:UserController.php

示例4: setActionLoggerShouldSetActionLogger

 /**
  * @test
  * @group library
  */
 public function setActionLoggerShouldSetActionLogger()
 {
     $this->assertInstanceOf('Seitenbau\\Logger\\Action', Registry::getActionLogger());
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:8,代碼來源:RegistryTest.php

示例5: editmetaAction

 public function editmetaAction()
 {
     $validatedRequest = $this->getValidatedRequest('Template', 'EditMeta');
     // Darf das Template bearbeitet werden?
     $check = array('id' => $validatedRequest->getId(), 'websiteId' => $validatedRequest->getWebsiteId());
     $this->getBusiness()->checkUserRights('edit', $check);
     // Es darf kein Lock auf dem Modul vorhanden sein!
     $hasLock = $this->hasLock($validatedRequest->getId(), $validatedRequest->getWebsiteId(), LockBusiness::LOCK_TYPE_TEMPLATE);
     if (false !== $hasLock) {
         return false;
     }
     $attributes = array();
     if ($validatedRequest->getName() !== null) {
         $attributes['name'] = $validatedRequest->getName();
     }
     $template = $this->getBusiness()->update($validatedRequest->getId(), $validatedRequest->getWebsiteId(), $attributes);
     Registry::getActionLogger()->logAction(TemplateBusiness::TEMPLATE_EDIT_META_ACTION, array('websiteId' => $validatedRequest->getWebsiteId(), 'id' => $template->getId(), 'name' => $template->getName(), 'contentChecksum' => $template->getContentchecksum()));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:18,代碼來源:TemplateController.php

示例6: migrateDb

 /**
  * @param string|null $toVersion
  *
  * @return array
  * @throws \Doctrine\DBAL\Migrations\MigrationException
  */
 protected function migrateDb($toVersion = null)
 {
     // the order is important
     $updateInfo = array();
     // 1. reset/clear opcode cache
     $this->resetOpCodeCache();
     // 2. migrate database
     $configuration = $this->getDoctrineMigrationConfig();
     // Information ermitteln
     $currentVersion = $configuration->getCurrentVersion();
     $latestVersion = $configuration->getLatestVersion();
     if ($toVersion === null) {
         $toVersion = $latestVersion;
     }
     // DB-Migration durchfuehren
     $migration = new \Doctrine\DBAL\Migrations\Migration($configuration);
     $migration->migrate($toVersion, false);
     $versionInfo = array('current' => (string) $currentVersion, 'latest' => (string) $latestVersion, 'migrateto' => (string) $toVersion);
     // log migrate
     Registry::getActionLogger()->logAction(self::SPACE_MIGRATED_ACTION, $versionInfo);
     return array('version' => $versionInfo);
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:28,代碼來源:Cli.php

示例7: logSuccessfulSent

 /**
  * @param array $submitted_additional_info
  */
 protected function logSuccessfulSent($submitted_additional_info)
 {
     Registry::getActionLogger()->logAction(CliBusiness::SPACE_SUBMITTED_LOG, $submitted_additional_info);
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:7,代碼來源:SendStatisticToAnalytics.php

示例8: logDiskUsage

 public static function logDiskUsage()
 {
     Registry::getActionLogger()->logAction(CliBusiness::SPACE_DISK_USAGE_ACTION, array('disk_usage' => self::getDiskUsage(), 'metric_value' => 'disk_usage'));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:4,代碼來源:DiskUsageHelper.php

示例9: logImport

 protected function logImport($actionName, array $importData, $info)
 {
     if (isset($importData['importId'])) {
         $info['importId'] = $importData['importId'];
     }
     if (isset($importData['websiteId'])) {
         $info['websiteId'] = $importData['websiteId'];
     }
     if (isset($importData['conflict']) && is_array($importData['conflict'])) {
         $info['conflict'] = array();
         if (isset($importData['conflict']['modules'])) {
             $info['conflict']['modules'] = count($importData['conflict']['modules']);
         }
         if (isset($importData['conflict']['templates'])) {
             $info['conflict']['templates'] = count($importData['conflict']['templates']);
         }
         if (isset($importData['conflict']['templatesnippets'])) {
             $info['conflict']['templatesnippets'] = count($importData['conflict']['templatesnippets']);
         }
         if (isset($importData['conflict']['media'])) {
             $info['conflict']['media'] = count($importData['conflict']['media']);
         }
     }
     $info['imported'] = array();
     if (isset($importData['modules'])) {
         $info['imported']['modules'] = count($importData['modules']);
     }
     if (isset($importData['templates'])) {
         $info['imported']['templates'] = count($importData['templates']);
     }
     if (isset($importData['templatesnippets'])) {
         $info['imported']['templatesnippets'] = count($importData['templatesnippets']);
     }
     if (isset($importData['pages'])) {
         $info['imported']['pages'] = count($importData['pages']);
     }
     if (isset($importData['media'])) {
         $info['imported']['media'] = count($importData['media']);
     }
     if (isset($importData['usergroups'])) {
         $info['imported']['usergroups'] = count($importData['usergroups']);
     }
     if (isset($importData['website'])) {
         $info['imported']['website'] = count($importData['website']);
     }
     Registry::getActionLogger()->logAction($actionName, $info);
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:47,代碼來源:ImportController.php

示例10: moveAction

 /**
  * Verschiebt eine Page innerhalb der Website-Navigation
  */
 public function moveAction()
 {
     $validatedRequest = $this->getValidatedRequest('Page', 'Move');
     // darf page geloescht werden?
     $check = array('id' => $validatedRequest->getId(), 'websiteId' => $validatedRequest->getWebsiteId());
     $this->getBusiness()->checkUserRights('createChildren', $check);
     // darf page an neuer stelle eingebunden werden?
     $check = array('id' => $validatedRequest->getParentId(), 'websiteId' => $validatedRequest->getWebsiteId());
     $this->getBusiness()->checkUserRights('createChildren', $check);
     $navigation = $this->getBusiness()->movePageInNavigation($validatedRequest->getId(), $validatedRequest->getWebsiteId(), $validatedRequest->getParentId(), $validatedRequest->getInsertBeforeId());
     Registry::getActionLogger()->logAction(PageBusiness::PAGE_MOVE_ACTION, array('websiteId' => $validatedRequest->getWebsiteId(), 'id' => $validatedRequest->getId(), 'parentId' => $validatedRequest->getParentId(), 'beforeId' => $validatedRequest->getInsertBeforeId()));
     $this->responseData->setData(new Response\Move($navigation));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:16,代碼來源:PageController.php

示例11: updatecontentAction

 /**
  * @SWG\Api(
  *   path="/website/updatecontent",
  *   @SWG\Operation(
  *        method="GET, POST",
  *        summary="Update all contents of the website",
  *        notes="Updates all contents of the website with the given id.",
  *        type="WebsiteUpdateContent",
  *        nickname="UpdateContent")
  * ))
  */
 public function updatecontentAction()
 {
     /** @var \Cms\Request\Website\UpdateContent $validateRequest */
     $validateRequest = $this->getValidatedRequest('Website', 'UpdateContent');
     $websiteId = $validateRequest->getProperty('websiteid');
     $this->getBusiness()->checkUserRights('updatecontent', array('websiteId' => $websiteId));
     $this->getBusiness('Lock')->removeLocksByWebsiteId($websiteId);
     $this->getBusiness('ContentUpdater')->updateAllContentsOfWebsite($websiteId);
     Registry::getActionLogger()->logAction(WebsiteBusiness::WEBSITE_UPDATE_CONTENT_ACTION, array('websiteId' => $websiteId));
 }
開發者ID:rukzuk,項目名稱:rukzuk,代碼行數:21,代碼來源:WebsiteController.php


注:本文中的Seitenbau\Registry::getActionLogger方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。