public static function EntityBrowserPagerElement::setCurrentPage in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/Element/EntityBrowserPagerElement.php \Drupal\entity_browser\Element\EntityBrowserPagerElement::setCurrentPage()
Sets current page.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: Form state.
int $page: (Optional) Page to set as current. Pager will be reset to the first page if omitted.
2 calls to EntityBrowserPagerElement::setCurrentPage()
- PagerTestWidget::submitFirst in tests/
modules/ entity_browser_test/ src/ Plugin/ EntityBrowser/ Widget/ PagerTestWidget.php - Submit callback for first page reset button.
- PagerTestWidget::submitLast in tests/
modules/ entity_browser_test/ src/ Plugin/ EntityBrowser/ Widget/ PagerTestWidget.php - Submit callback for last page reset button.
File
- src/
Element/ EntityBrowserPagerElement.php, line 132
Class
- EntityBrowserPagerElement
- Provides an Entity Browser pager form element.
Namespace
Drupal\entity_browser\ElementCode
public static function setCurrentPage(FormStateInterface $form_state, $page = 1) {
$form_state
->set('page', $page);
}