protected function FieldablePanelsPanesSubContext::getFPPByAdminTitle in Panopoly 7
Get a Fieldable Panels Pane by admin title.
Parameters
string $admin_title: The admin title of the FPP to retrieve.
Return value
object The Fieldable Panels Pane entity object.
2 calls to FieldablePanelsPanesSubContext::getFPPByAdminTitle()
- FieldablePanelsPanesSubContext::assertRevisionCount in modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test_fpp.behat.inc - @Then fieldable panels pane :admin_title should have :expected_count revision(s)
- FieldablePanelsPanesSubContext::iAmViewingFPPRevision in modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test_fpp.behat.inc - @Given I am viewing revision :revision_number of fieldable panels pane :admin_title
File
- modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test_fpp.behat.inc, line 46 - Provide Behat step-definitions for Fieldable Panels Panes.
Class
Code
protected function getFPPByAdminTitle($admin_title) {
$fpps = fieldable_panels_panes_load_multiple(array(), array(
'admin_title' => $admin_title,
));
if (empty($fpps)) {
throw new \Exception(sprintf('Fieldable panels pane "%s" was not found', $admin_title));
}
return reset($fpps);
}