isBatchSupported() публичный Метод

Return whether this batch is a supported type for the converter.
public isBatchSupported ( Batch $batch ) : boolean
$batch LdapTools\BatchModify\Batch
Результат boolean
Пример #1
0
 /**
  * When aggregating a set of values they need to be modified with 'set'. The other methods ('reset', 'add', or
  * 'remove') are not valid. Additionally, all batch modification array keys should be present. However, the
  * converter can determine whether the batch operation is valid with the 'isBatchSupported()' method.
  *
  * @param Batch $batch
  * @param AttributeConverterInterface $converter
  */
 protected function validateBatchAggregate(Batch $batch, AttributeConverterInterface $converter)
 {
     if (!$converter->isBatchSupported($batch)) {
         throw new LogicException(sprintf('Unable to modify "%s". The "%s" action is not allowed.', $batch->getAttribute(), array_search($batch->getModType(), Batch::TYPE)));
     }
 }