private function Controller::regenerateAncestorRelations

This regenerates the ancestor table which is used for fast read access.

Parameters

AclInterface $acl:

Return value

void

File

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

Class

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

Namespace

Doctrine\Tests\Common\Annotations\Fixtures

Code

private function regenerateAncestorRelations(AclInterface $acl) {
  $pk = $acl
    ->getId();
  $this->connection
    ->executeQuery($this
    ->getDeleteObjectIdentityRelationsSql($pk));
  $this->connection
    ->executeQuery($this
    ->getInsertObjectIdentityRelationSql($pk, $pk));
  $parentAcl = $acl
    ->getParentAcl();
  while (null !== $parentAcl) {
    $this->connection
      ->executeQuery($this
      ->getInsertObjectIdentityRelationSql($pk, $parentAcl
      ->getId()));
    $parentAcl = $parentAcl
      ->getParentAcl();
  }
}