Smile\ElasticsuiteCore\Model\Search\Request\Source\Containers::get PHP Метод

get() публичный Метод

Retrieve a container by its code
public get ( string $code ) : array
$code string The container code
Результат array
    public function get($code)
    {
        return $this->baseConfig->get($code, []);
    }

Usage Example

Пример #1
0
 /**
  * Get scope name and scopeId
  *
  * @return void
  */
 private function initScope()
 {
     if ($this->getSection() === null) {
         $this->setSection('');
     }
     if ($this->getContainer() === null) {
         $this->setContainer('');
     }
     if ($this->getStore() === null) {
         $this->setStore('');
     }
     $scope = 'default';
     $scopeCode = 'default';
     if ($this->getStore()) {
         $scope = 'containers_stores';
         $store = $this->_storeManager->getStore($this->getStore());
         $scopeCode = $store->getId();
         if ($this->getContainer() && $this->getContainer() != "") {
             $scopeCode = $this->getContainer() . "|" . $scopeCode;
         }
     } elseif ($this->getContainer()) {
         $scope = 'containers';
         $container = $this->containersSource->get($this->getContainer());
         $scopeCode = $container['name'];
     }
     $this->setScope($scope);
     $this->setScopeCode($scopeCode);
 }
All Usage Examples Of Smile\ElasticsuiteCore\Model\Search\Request\Source\Containers::get