public static function FaqHelper::searchInArgs in Frequently Asked Questions 8
Helper function to search a string in the path.
Parameters
int $id: Number of the path's part.
Return value
string The id of the path which indexed by the given path.
7 calls to FaqHelper::searchInArgs()
- faq_preprocess_page in ./
faq.module - Implements template_preprocess_page().
- OrderForm::buildForm in src/
Form/ OrderForm.php - Form constructor.
- template_preprocess_faq_category_hide_answer in includes/
faq.hide_answer.inc - Create categorized FAQ page if set to show answer when question is clicked.
- template_preprocess_faq_category_new_page in includes/
faq.new_page.inc - Create categorized FAQ page if set to show answer in a new page.
- template_preprocess_faq_category_questions_inline in includes/
faq.questions_inline.inc - Create categorized FAQ page if set to show/hide the questions inline.
File
- src/
FaqHelper.php, line 251
Class
- FaqHelper
- Contains static helper functions for FAQ module.
Namespace
Drupal\faqCode
public static function searchInArgs($path) {
$url_comp = explode('/', \Drupal::request()
->getRequestUri());
if ($key = array_search($path, $url_comp)) {
return $key;
}
else {
return NULL;
}
}