Group :: copy: Bitrix method

      
<?php 
//  Bitrix\Blog\Copy\Integration\Group :: copy()
//  /dist/bitrix/modules/blog/lib/copy/integration/group.php:32

    
public function copy($groupId$copiedGroupId)
    {
        
$blogPostIds $this->getBlogPostIdsByGroupId($groupId);
        if (!
$blogPostIds)
        {
            return;
        }

        
$this->addToQueue($copiedGroupId);

        
Option::set($this->moduleId$this->checkerOption.$copiedGroupId"Y");

        
$queueOption = [
            
"executiveUserId" => $this->executiveUserId,
            
"groupId" => $groupId,
            
"copiedGroupId" => $copiedGroupId,
            
"features" => $this->features
        
];
        
Option::set($this->moduleId$this->stepperOption.$copiedGroupIdserialize($queueOption));

        
$agent = \CAgent::getList([], [
            
"MODULE_ID" => $this->moduleId,
            
"NAME" => $this->stepper."::execAgent();"
        
])->fetch();
        if (!
$agent)
        {
            
GroupStepper::bind(1);
        }
    }