PHP code example of amara / onehydra-bundle

1. Go to this page and download the library: Download amara/onehydra-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

amara / onehydra-bundle example snippets


// Get the entity from our system for the current request
$oneHydraPage = $this->get('amara_one_hydra.page_manager')->getPageByRequest($request);

if ($oneHydraPage) {
    // Get the PageInterface object which reflects what's on the OneHydra system 
    $page = $oneHydraPage->getPage();
    
    // Override what you want based on the content of page...
    $title = $page->getTitle();
}