Neos\Neos\EventLog\Domain\Service\EventEmittingService::setCurrentAccountIdentifier PHP Метод

setCurrentAccountIdentifier() публичный Метод

Set the current account identifier
public setCurrentAccountIdentifier ( string $accountIdentifier ) : void
$accountIdentifier string
Результат void
    public function setCurrentAccountIdentifier($accountIdentifier)
    {
        $this->currentAccountIdentifier = $accountIdentifier;
    }

Usage Example

 /**
  * Try to set the current account identifier emitting the events, if possible
  *
  * @return void
  */
 protected function initializeAccountIdentifier()
 {
     if ($this->securityContext->canBeInitialized()) {
         $account = $this->securityContext->getAccount();
         if ($account !== null) {
             $this->eventEmittingService->setCurrentAccountIdentifier($account->getAccountIdentifier());
         }
     }
 }