public function SalesforceAuthForm::exists in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 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\FormCode
public function exists($id) {
$action = \Drupal::entityTypeManager()
->getStorage($this->entity
->getEntityTypeId())
->load($id);
return !empty($action);
}