You are here

public function SalesforceAuthForm::exists in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 5.0.x src/Form/SalesforceAuthForm.php \Drupal\salesforce\Form\SalesforceAuthForm::exists()

Determines if the config already exists.

Parameters

string $id: The config ID.

Return value

bool TRUE if the config exists, FALSE otherwise.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Form/SalesforceAuthForm.php, line 176

Class

SalesforceAuthForm
Entity form for salesforce_auth.

Namespace

Drupal\salesforce\Form

Code

public function exists($id) {
  $action = \Drupal::entityTypeManager()
    ->getStorage($this->entity
    ->getEntityTypeId())
    ->load($id);
  return !empty($action);
}