uawdijnntqw1x1x1
IP : 18.191.120.131
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
yar.axolotls.ru
/
52131
/
..
/
bitrix
/
modules
/
blog
/
lib
/
copy
/
blogpostmanager.php
/
/
<?php namespace Bitrix\Blog\Copy; use Bitrix\Blog\Copy\Implement\BlogComment as BlogCommentImplementer; use Bitrix\Blog\Copy\Implement\BlogPost as BlogPostImplementer; use Bitrix\Main\Copy\Container; use Bitrix\Main\Copy\ContainerCollection; use Bitrix\Main\Copy\EntityCopier; use Bitrix\Main\Result; class BlogPostManager { private $executiveUserId; private $blogPostIdsToCopy = []; private $features = []; private $changedRights = []; private $result; private $mapIdsCopiedPosts = []; public function __construct($executiveUserId, array $blogPostIdsToCopy) { $this->executiveUserId = $executiveUserId; $this->blogPostIdsToCopy = $blogPostIdsToCopy; $this->result = new Result(); } /** * Writes features to the copy queue. * * @param array $features */ public function setFeatures(array $features) { $this->features = array_filter($features); } public function setChangedRights($changedRights) { $this->changedRights = $changedRights; } public function startCopy() { $containerCollection = $this->getContainerCollection(); $blogPostImplementer = $this->getBlogPostImplementer(); $blogPostCopier = $this->getBlogPostCopier($blogPostImplementer); $this->result = $blogPostCopier->copy($containerCollection); $this->mapIdsCopiedPosts = $blogPostCopier->getMapIdsCopiedEntity(); return $this->result; } public function getMapIdsCopiedPosts() { return $this->mapIdsCopiedPosts; } private function getContainerCollection() { $containerCollection = new ContainerCollection(); foreach ($this->blogPostIdsToCopy as $blogPostId) { $containerCollection[] = new Container($blogPostId); } return $containerCollection; } private function getBlogPostCopier(BlogPostImplementer $blogPostImplementer) { return new EntityCopier($blogPostImplementer); } private function getBlogPostImplementer() { global $USER_FIELD_MANAGER; $blogPostImplementer = new BlogPostImplementer(); $blogPostImplementer->setBlogCommentCopier($this->getBlogCommentCopier()); $blogPostImplementer->setUserFieldManager($USER_FIELD_MANAGER); $blogPostImplementer->setFeatures($this->features); $blogPostImplementer->setChangedRights($this->changedRights); $blogPostImplementer->setExecutiveUserId($this->executiveUserId); return $blogPostImplementer; } private function getBlogCommentCopier() { global $USER_FIELD_MANAGER; $blogCommentImplementer = new BlogCommentImplementer(); $blogCommentImplementer->setUserFieldManager($USER_FIELD_MANAGER); $blogCommentImplementer->setExecutiveUserId($this->executiveUserId); return new EntityCopier($blogCommentImplementer); } }
/var/www/axolotl/data/www/yar.axolotls.ru/52131/../bitrix/modules/blog/lib/copy/blogpostmanager.php