Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Setup Class Reference
Inheritance diagram for Setup:
Setup SchemaSetupInterface SetupInterface SetupInterface

Public Member Functions

 getIdxName ( $tableName, $fields, $indexType='', $connectionName=ResourceConnection::DEFAULT_CONNECTION)
 
 getFkName ( $priTableName, $priColumnName, $refTableName, $refColumnName, $connectionName=ResourceConnection::DEFAULT_CONNECTION)
 
- Public Member Functions inherited from Setup
 __construct (\Magento\Framework\App\ResourceConnection $resource, $connectionName=ModuleDataSetupInterface::DEFAULT_SETUP_CONNECTION)
 
 getConnection ($connectionName=null)
 
 setTable ($tableName, $realTableName)
 
 getTablePlaceholder ($tableName)
 
 getTable ($tableName, $connectionName=ResourceConnection::DEFAULT_CONNECTION)
 
 tableExists ($table, $connectionName=ResourceConnection::DEFAULT_CONNECTION)
 
 run ($sql)
 
 startSetup ()
 
 endSetup ()
 
- Public Member Functions inherited from SetupInterface
 getConnection ()
 
 getTable ($tableName)
 
 tableExists ($table)
 
- Public Member Functions inherited from SchemaSetupInterface
 getIdxName ($tableName, $fields, $indexType='')
 
 getFkName ($priTableName, $priColumnName, $refTableName, $refColumnName)
 

Detailed Description

@api

Definition at line 14 of file Setup.php.

Member Function Documentation

◆ getFkName()

getFkName (   $priTableName,
  $priColumnName,
  $refTableName,
  $refColumnName,
  $connectionName = ResourceConnection::DEFAULT_CONNECTION 
)

Retrieve 32bit UNIQUE HASH for a Table foreign key

Parameters
string$priTableNamethe target table name
string$priColumnNamethe target table column name
string$refTableNamethe reference table name
string$refColumnNamethe reference table column name
string$connectionName
Returns
string

Definition at line 44 of file Setup.php.

50  {
51  return $this->getConnection($connectionName)->getForeignKeyName(
52  $this->getTable($priTableName),
53  $priColumnName,
54  $refTableName,
55  $refColumnName
56  );
57  }
getTable($tableName, $connectionName=ResourceConnection::DEFAULT_CONNECTION)
Definition: Setup.php:120

◆ getIdxName()

getIdxName (   $tableName,
  $fields,
  $indexType = '',
  $connectionName = ResourceConnection::DEFAULT_CONNECTION 
)

Retrieve 32bit UNIQUE HASH for a Table index

Parameters
string$tableName
array | string$fields
string$indexType
string$connectionName
Returns
string

Definition at line 25 of file Setup.php.

30  {
31  return $this->getConnection($connectionName)->getIndexName($this->getTable($tableName), $fields, $indexType);
32  }
$tableName
Definition: trigger.php:13
$fields
Definition: details.phtml:14
getTable($tableName, $connectionName=ResourceConnection::DEFAULT_CONNECTION)
Definition: Setup.php:120

The documentation for this class was generated from the following file: