[getCurrentEntityId description]
@return integer the primary party key of the user that will log in
@todo needs to be refactored, as it doesn't make sense...
480708
public function getCurrentEntityId()
	{
		$query = new Query;
		$query->select('tbl_party.id AS id')
			->from('tbl_user')
      		->innerJoin('tbl_contact', 'tbl_contact.email = tbl_user.email')
      		->innerJoin('tbl_party','tbl_party.id = tbl_contact.party_id')
			->where('tbl_user.id = '.\Yii::$app->user->identity->id)
			->one();
		
		$command = $query->createCommand();
		$row = $command->queryOne();

		if(!is_null($row['id']))
		{
			return $row['id'];
		}
		return NULL;
	}
983520
public function getId() : ?int 
    {
        if ( ! $this->hasId()) {
            $this->setId($this->getDefaultId());
        }
        return $this->id;
    }
1026529
public function getContactId()
    {
        if ($mtcId = $this->getInt(self::MTC_ID)) {
            return $mtcId;
        } elseif ($mauticSessionId = $this->getSessionId()) {
            return $this->getInt($mauticSessionId);
        }

        return null;
    }
715589
public function getNextId()
    {
        try {
            return $this->innerGateway->getNextId();
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
200397
protected function getUpdateId(): int
    {
        if (!$this->updateId) {
            $data = $this->browse("DirectChildren");
            $this->updateId = $data["UpdateID"];
        }
        return $this->updateId;
    }
235543
public function getId()
    {
        $tmp = (array) $this->getHeaderFieldModel($this->getIdField());

        return $this->headers->has($this->getIdField()) ? current($tmp) : $this->id;
    }
224651
public function get_identifier() {
        static $instances = 0;
        if ($this->lockidentifier === null) {
            $this->lockidentifier = md5(
                $this->get_definition()->generate_definition_hash() .
                sesskey() .
                $instances++ .
                'cache_application'
            );
        }
        return $this->lockidentifier;
    }
1130243
public function getSessionId()
    {
        if($this->startSession && !$this->session->isStarted()) {
            $this->session->start();
        }

        if ($this->session->isStarted()) {
            // We assume the sessionId contains data and has to be protected,
            // so we use a salted SHA1 checksum.
            return sha1($this->secret . $this->session->getId());
            // In the end this method will be called for _each_ log message.
            // If the session id would be constant and accessible through the whole request,
            // this would not be necessary.
        }

        return null;
    }
763659
public static function getCurrent()
    {
        $class = get_called_class();
        if (Session::get('user')) {
            return $class::search()->where('user_id', Session::get('user')->user_id)->execOne();
        }
        return false;
    }
124659
public function getId()
    {
        $id = $this->props['attribs']['id'];
        $sepChar = '_'; // character to join prefix and id
        $repChar = '_'; // replace \W with this char
        if (!$id && $this->props['attribs']['name']) {
            $id = \preg_replace('/\W/', $repChar, $this->props['attribs']['name']);
            $id = \preg_replace('/'.$repChar.'+/', $repChar, $id);
            $id = \trim($id, $repChar);
            if ($id && $this->props['idPrefix']) {
                $prefix = $this->props['idPrefix'];
                if (\preg_match('/[a-z]$/i', $prefix)) {
                    $prefix = $prefix.$sepChar;
                }
                $id = $prefix.$id;
            }
            if ($id) {
                $this->props['attribs']['id'] = $id;
            }
        }
        return $id;
    }
1279647
protected function getCustomerId() {
    $customer_id = NULL;
    $current_user = $this->getCurrentUser();

    if ($current_user->isAnonymous()) {
      return $customer_id;
    }

    $use_ecomm_sessions = \Drupal::config('acm.commerce_users')
      ->get('use_ecomm_sessions');

    if ($use_ecomm_sessions) {
      $customer_id = $current_user->getAccount()->id();
    }
    else {
      $customer_id = $current_user->getAccount()->acm_customer_id;
    }

    return $customer_id;
  }
537078
protected function uid()
	{
		if ($this->uid === null) {
			$client = $this->getClient('common');

			$this->uid = $client->call('login', array(
				$this->database,
				$this->user,
				$this->password
			));
		}

		return $this->uid;
	}
1174965
protected function getCacheKey()
    {
        $item = UserPreference::forUser();
        $userId = $item->userContext ? $item->userContext->id : 0;
        return $this->recordCode.'-userpreference-'.$userId;
    }
1212307
public function getIdentity() {
        if ($this->identity === null) {
            foreach ($this->mapping['properties'] as $name => $property) {
                if (isset($property['primary']) && $property['primary']===true) {
                    return $this->identity = new PropertyMapping($this, $property);
                }
            }
            throw new RuntimeException('Invalid mapping for entity "'.$this->getClassName().'" (missing primary key mapping)');
        }
        return $this->identity;
    }
1104470
protected function _guessForeignKey()
    {
        $descriptor = Entity\Manager::getInstance()
            ->get($this->getRelatedEntity());
        $name = explode('\\', $descriptor->getEntity()->getClassName());
        $name = end($name);
        return strtolower($name) . '_id';
    }
360431
public function key()
	{
		$pageSize=$this->_dataProvider->getPagination()->getPageSize();
		return $this->_currentPage*$pageSize+$this->_currentIndex;
	}
144036
public function getCurrentUser()
    {
        if ($this->currentuser === null) {
            $hash = $this->getCurrentSessionHash();
            if ($hash === false) {
                return false;
            }

            $uid = $this->getSessionUID($hash);
            if ($uid === false) {
                return false;
            }

            $this->currentuser = $this->getUser($uid);
        }
        return $this->currentuser;
    }