public function ContentBlockManager::getSelector in Open Social 10.1.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_content_block/src/ContentBlockManager.php \Drupal\social_content_block\ContentBlockManager::getSelector()
- 8.8 modules/social_features/social_content_block/src/ContentBlockManager.php \Drupal\social_content_block\ContentBlockManager::getSelector()
- 10.3.x modules/social_features/social_content_block/src/ContentBlockManager.php \Drupal\social_content_block\ContentBlockManager::getSelector()
- 10.0.x modules/social_features/social_content_block/src/ContentBlockManager.php \Drupal\social_content_block\ContentBlockManager::getSelector()
- 10.2.x modules/social_features/social_content_block/src/ContentBlockManager.php \Drupal\social_content_block\ContentBlockManager::getSelector()
Build the States API selector.
Parameters
string $field_name: The field name.
string $column: The field column name.
array|null $field_parents: (optional) The field parents.
Return value
string The selector.
Overrides ContentBlockManagerInterface::getSelector
File
- modules/
social_features/ social_content_block/ src/ ContentBlockManager.php, line 46
Class
- ContentBlockManager
- Class ContentBlockManager.
Namespace
Drupal\social_content_blockCode
public function getSelector($field_name, $column, $field_parents = NULL) {
if ($field_parents !== NULL) {
$this->fieldParents = $field_parents;
}
$parents = array_merge($this->fieldParents, [
$field_name,
0,
$column,
]);
$parent = array_shift($parents);
return ':input[name="' . $parent . '[' . implode('][', $parents) . ']"]';
}