public function MatchingProcessor::findIndexOfItemWithId in Opigno module 8
Same name and namespace in other branches
- 3.x ActivityTypes/opigno_h5p/src/TypeProcessors/MatchingProcessor.php \Drupal\opigno_h5p\TypeProcessors\MatchingProcessor::findIndexOfItemWithId()
Find id of an item with a given index inside given array.
1 call to MatchingProcessor::findIndexOfItemWithId()
- MatchingProcessor::mapPatternIDsToIndexes in ActivityTypes/
opigno_h5p/ src/ TypeProcessors/ MatchingProcessor.php - Creates a map for IDs from pattern and droppable and draggable arrays.
File
- ActivityTypes/
opigno_h5p/ src/ TypeProcessors/ MatchingProcessor.php, line 120
Class
- MatchingProcessor
- Class MatchingProcessor.
Namespace
Drupal\opigno_h5p\TypeProcessorsCode
public function findIndexOfItemWithId($haystack, $id) {
return isset($haystack[$id]) ? $haystack[$id]->id : NULL;
}