Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Integration.php
Go to the documentation of this file.
1 <?php
8 
13 {
19  protected function _construct()
20  {
21  $this->_init('integration', 'integration_id');
22  }
23 
30  public function selectActiveIntegrationByConsumerId($consumerId)
31  {
32  $connection = $this->getConnection();
33  $select = $connection->select()
34  ->from($this->getMainTable())
35  ->where('consumer_id = ?', $consumerId)
36  ->where('status = ?', \Magento\Integration\Model\Integration::STATUS_ACTIVE);
37  return $connection->fetchRow($select);
38  }
39 }
$connection
Definition: bulk.php:13