public function ConfigActionsFile::detect in Config Actions 8
Determine if $source is valid for the specific plugin.
Parameters
mixed $source:
Return value
bool TRUE if $source is a valid reference for this plugin.
Overrides ConfigActionsSourceBase::detect
File
- src/
Plugin/ ConfigActionsSource/ ConfigActionsFile.php, line 79
Class
- ConfigActionsFile
- Plugin for config source from files.
Namespace
Drupal\config_actions\Plugin\ConfigActionsSourceCode
public function detect($source) {
$extension = '.' . FileStorage::getFileExtension();
return is_string($source) && substr($source, -strlen($extension)) === $extension;
}