private function Controller::createOrRetrieveSecurityIdentityId

Returns the primary key for the passed security identity.

If the security identity does not yet exist in the database, it will be created.

Parameters

SecurityIdentityInterface $sid:

Return value

integer

2 calls to Controller::createOrRetrieveSecurityIdentityId()
Controller::updateAceProperty in drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Controller.php
This processes changes on an ACE related property (classAces, or objectAces).
Controller::updateFieldAceProperty in drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Controller.php
This processes changes on an ACE related property (classFieldAces, or objectFieldAces).

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Controller.php, line 93

Class

Controller
@Route("/someprefix") @author Johannes M. Schmitt <schmittjoh@gmail.com>

Namespace

Doctrine\Tests\Common\Annotations\Fixtures

Code

private function createOrRetrieveSecurityIdentityId(SecurityIdentityInterface $sid) {
  if (false !== ($id = $this->connection
    ->executeQuery($this
    ->getSelectSecurityIdentityIdSql($sid))
    ->fetchColumn())) {
    return $id;
  }
  $this->connection
    ->executeQuery($this
    ->getInsertSecurityIdentitySql($sid));
  return $this->connection
    ->executeQuery($this
    ->getSelectSecurityIdentityIdSql($sid))
    ->fetchColumn();
}