Get entity of this extension

@return \Espo\Entities\Extension
438541
protected function getExtensionEntity()
    {
        if (!isset($this->extensionEntity)) {
            $processId = $this->getProcessId();
            $this->extensionEntity = $this->getEntityManager()->getEntity('Extension', $processId);
            if (!isset($this->extensionEntity)) {
                throw new Error('Extension Entity not found.');
            }
        }

        return $this->extensionEntity;
    }
1186257
public function getUserEntityRepository() 
    {
    	if(isset($this->er['User'])) {
    		return $this->er['User'];
    	}
    	$entityRepository = $this->getEntityManager()->getRepository('Neobazaar\Entity\User');
    	$entityRepository->setServiceLocator($this->getServiceManager());
    	$this->er['User'] = $entityRepository;
    	
    	return $this->er['User'];
    }
147509
public function getEntity($entityId)
    {
        //test the entity name
        if ($entityId == null) {
            throw new \Exception('The businessEntityId is not defined for the entityProxy with the id:'.$this->getId());
        }

        $functionName = 'get'.ucfirst($entityId);
        $entity = call_user_func([$this, $functionName]);

        return $entity;
    }
769879
public static function getEntityManager() {
		if (self::$_entityManager == null) {
			self::$_entityManager = self::_getInstance ();
		}
		return self::$_entityManager;
	}
1361947
public function getEntityRepository() {
    if (empty($this->entityRepository)) {
      $this->entityRepository = \Drupal::service('entity.repository');
    }
    return $this->entityRepository;
  }
291478
protected function getEntitiesDescriptor()
    {
        $ret = new EntitiesDescriptor();
        $now = time();

        // add RegistrationInfo extension if enabled
        if (!empty($this->regInfo)) {
            $ri = new RegistrationInfo();
            $ri->registrationInstant = $now;
            foreach ($this->regInfo as $riName => $riValues) {
                switch ($riName) {
                    case 'authority':
                        $ri->registrationAuthority = $riValues;
                        break;
                    case 'instant':
                        $ri->registrationInstant = Utils::xsDateTimeToTimestamp($riValues);
                        break;
                    case 'policies':
                        $ri->RegistrationPolicy = $riValues;
                        break;
                }
            }
            $ret->Extensions[] = $ri;
        }

        foreach ($this->sources as $source) {
            $m = $source->getMetadata();
            if ($m === NULL) {
                continue;
            }
            if ($m instanceof EntityDescriptor) {
                $ret->children[] = $m;
            } elseif ($m instanceof EntitiesDescriptor) {
                $ret->children = array_merge($ret->children, self::extractEntityDescriptors($m));
            }
        }

        $ret->children = array_unique($ret->children, SORT_REGULAR);
        $ret->validUntil = $now + $this->validLength;

        return $ret;
    }
189808
protected function getExtensionManager()
    {
        if ($this->getServiceLocator()->has(common_ext_ExtensionsManager::SERVICE_ID)) {
            $service = $this->getServiceLocator()->get(common_ext_ExtensionsManager::SERVICE_ID);
        } else {
            $service = new common_ext_ExtensionsManager();
            $this->getServiceLocator()->propagate($service);
        }
        return $service;
    }
1086577
public function getExtension()
    {
        $pos = strrpos($this->name, '.');
        if ($pos === false) {
            return null;
        } else {
            return substr($this->name, $pos + 1);
        }
    }
760744
public function class()
    {
        /** @var \Yajra\CMS\Repositories\Extension\Repository $repository */
        $repository = app('extensions');
        $extension  = $repository->findOrFail($this->entity->extension_id);

        return $extension->param('class');
    }
387108
protected function getEntityName()
    {
        if (null === $this->entityName) {
            $name             = get_class($this);
            $type             = ucfirst($this->abstractType);
            $name             = str_replace($this->getModuleNamespace() . '\\' . $type . '\\', '', $name);
            $name             = str_replace($type, '', $name);
            $this->entityName = $name;
        }
        return $this->entityName;
    }
234465
public function EntityExpression()
    {
        $glimpse = $this->lexer->glimpse();

        if ($this->lexer->isNextToken(Lexer::T_IDENTIFIER) && $glimpse['value'] === '.') {
            return $this->SingleValuedAssociationPathExpression();
        }

        return $this->SimpleEntityExpression();
    }
642790
public function get()
    {
        $uri = null;
        if ($this->context) {
            $uri = $this->context->getBaseUri() . '/';
        }
        $uri .= $this->params['endpoint'];
        
        $uri .= sprintf("?page=%d&perpage=%d"
            , $this->page
            , $this->perpage
            );
        
        // add filter if value is not empty
        foreach ($this->filters as $filter) {
            if (! empty($filter['value'])) {
                $uri .= sprintf("&%s=%s"
                    , $filter['field']
                    , rawurlencode($filter['value'])
                    );
            }
        }
        
        $res = $this->client->call($uri);

        // get and preserve pagination
        $lr = Client::getLastResponse();
        $this->pagination = isset($lr['body']) && isset($lr['body']['pagination']) ? $lr['body']['pagination'] : [];
        
        // convert array to Entities collection
        $this->data = [];
        foreach ($res as $data) {
            $this->data[] = (new Entity([], $this->client))->setData($data);
        }
        $this->current = 0;
        
        return $this->data;
    }
104230
protected function getEntityGenerator($classToExtend = null)
    {
        $entityGenerator = new EntityGenerator();
        if (!is_null($classToExtend)) {
            $entityGenerator->setClassToExtend($classToExtend);
        }
        $entityGenerator->setGenerateAnnotations(true);
        $entityGenerator->setGenerateStubMethods(true);
        $entityGenerator->setRegenerateEntityIfExists(false);
        $entityGenerator->setUpdateEntityIfExists(true);
        $entityGenerator->setNumSpaces(4);
        $entityGenerator->setAnnotationPrefix('ORM\\');

        return $entityGenerator;
    }
664064
public function getRecentVersion()
    {
        $em = \ORM::entityManager();
        $r = $em->getRepository('\Concrete\Core\Entity\File\Version');

        return $r->findOneBy(
            ['file' => $this],
            ['fvID' => 'desc']
        );
    }
43879
public function getEntityManager()
    {
        if (!isset($this->_entityManager)) {
            $this->_entityManager = $this->getServiceLocator()
                    ->get('Doctrine\ORM\EntityManager');
        }
        return $this->_entityManager;
    }
493155
public function getName()
    {
        if (!$this->entity->getTranslation($this->locale)) {
            return null;
        }

        return $this->entity->getTranslation($this->locale)->getName();
    }
481586
protected function getEntityGenerator()
    {
        $entityGenerator = new EntityGenerator();
        $entityGenerator->setFieldVisibility(EntityGenerator::FIELD_VISIBLE_PROTECTED);
        $entityGenerator->setGenerateAnnotations(false);
        $entityGenerator->setGenerateStubMethods(true);
        $entityGenerator->setRegenerateEntityIfExists(false);
        $entityGenerator->setUpdateEntityIfExists(true);
        $entityGenerator->setNumSpaces(4);
        $entityGenerator->setAnnotationPrefix('ORM\\');

        if ($this->configuration['with_interface']) {
            $entityGenerator->setClassToInterface($this->configuration['namespace'] . '\\' . $this->model.'Interface');
        }

        return $entityGenerator;
    }