PHP code example of docono / company-bundle
1. Go to this page and download the library: Download docono/company-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/ */
docono / company-bundle example snippets
if (Site::isSiteRequest()) {
$companyData = Config::getData();
} else {
$site = Pimcore\Tool\Frontend::getSiteForDocument($this->document);
$siteID = !$site ? 'site_0' : 'site_' . $site->getId();
$companyData = Config::getData($siteID);
}
$this->twig->addGlobal('companyInfo', $companyData);
config/bundles.php
$this->twig->addGlobal('companyInfo', Config::getData($siteID));