You are here

public function InternalReplicator::applies in Workspace 8

Determine if the replicator applies to the given workspaces.

Parameters

\Drupal\workspace\WorkspacePointerInterface $source: The workspace to replicate from.

\Drupal\workspace\WorkspacePointerInterface $target: The workspace to replicate to.

Return value

bool Returns true if this replicator applies.

Overrides ReplicatorInterface::applies

File

src/InternalReplicator.php, line 87

Class

InternalReplicator
A replicator within the current Drupal runtime.

Namespace

Drupal\workspace

Code

public function applies(WorkspacePointerInterface $source, WorkspacePointerInterface $target) {
  $source_workspace = $source
    ->getWorkspace();
  $target_workspace = $target
    ->getWorkspace();
  return $source_workspace instanceof WorkspaceInterface && $target_workspace instanceof WorkspaceInterface;
}