You are here

public function ServerFactory::getEnabledServers in Lightweight Directory Access Protocol (LDAP) 8.3

Fetch all enabled servers.

Return value

\Drupal\Core\Entity\EntityInterface[]|\Drupal\ldap_servers\Entity\Server[] An array of all enabled servers.

1 call to ServerFactory::getEnabledServers()
ServerFactory::getUserDataByAccount in ldap_servers/src/ServerFactory.php
Fetch user data from account.

File

ldap_servers/src/ServerFactory.php, line 93

Class

ServerFactory
Helper class to working with the Server classes.

Namespace

Drupal\ldap_servers

Code

public function getEnabledServers() {
  $ids = $this->entityManager
    ->getQuery()
    ->condition('status', 1)
    ->execute();
  return $this->entityManager
    ->loadMultiple($ids);
}