You are here

public function PluginBase::supportsOp in Backup and Migrate 5.0.x

Does this plugin implement the given operation.

Parameters

string $op: The name of the operation.

Return value

bool

Overrides PluginInterface::supportsOp

File

src/Core/Plugin/PluginBase.php, line 40

Class

PluginBase
@package Drupal\backup_migrate\Core\Plugin

Namespace

Drupal\backup_migrate\Core\Plugin

Code

public function supportsOp($op) {

  // If the function has the method then it supports the op.
  if (method_exists($this, $op)) {
    return TRUE;
  }

  // If the supported ops array contains the op then it is supported.
  $ops = $this
    ->supportedOps();
  return isset($ops[$op]);
}