Broken.php in Salesforce Suite 8.4
Same filename in this branch
Same filename and directory in other branches
File
modules/salesforce_mapping/src/Plugin/SalesforceMappingField/Broken.phpView source
<?php
namespace Drupal\salesforce_mapping\Plugin\SalesforceMappingField;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\salesforce_mapping\SalesforceMappingFieldPluginBase;
use Drupal\salesforce_mapping\Entity\SalesforceMappingInterface;
/**
* Adapter for entity properties and fields.
*
* @Plugin(
* id = "broken",
* label = @Translation("Broken")
* )
*/
class Broken extends SalesforceMappingFieldPluginBase {
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
// Try to preserve existing, broken config, so that it works again when the
// plugin gets restored:
$pluginForm = parent::buildConfigurationForm($form, $form_state);
return $this
->buildBrokenConfigurationForm($pluginForm, $form_state);
}
/**
* {@inheritdoc}
*/
public function value(EntityInterface $entity, SalesforceMappingInterface $mapping) {
}
/**
* {@inheritdoc}
*/
public static function isAllowed(SalesforceMappingInterface $mapping) {
return FALSE;
}
}