Пример #1
0
 /**
  *
  * @return string
  */
 public function getSortField()
 {
     if (empty($this->sortField)) {
         $this->sortField = \Simplify\Inflector::singularize($this->getTable()) . '_order';
     }
     return $this->sortField;
 }
Пример #2
0
 /**
  * Get the key on the related table. By default, it's the table's primary key (<table>_id).
  *
  * @return string
  */
 public function getForeignKey()
 {
     if (empty($this->foreignKey)) {
         $this->foreignKey = \Simplify\Inflector::singularize($this->getTable()) . '_id';
     }
     return $this->foreignKey;
 }
Пример #3
0
 /**
  *
  * @return string
  */
 public function getPrimaryKey()
 {
     if (empty($this->primaryKey)) {
         $this->primaryKey = Inflector::singularize($this->getTable()) . Form::ID;
     }
     return $this->primaryKey;
 }
Пример #4
0
 /**
  *
  * @return string
  */
 public function getRight()
 {
     if (empty($this->right)) {
         $this->right = \Simplify\Inflector::singularize($this->getTable()) . '_right';
     }
     return $this->right;
 }
Пример #5
0
 /**
  *
  * @return string
  */
 public function getForeignKeyColumn()
 {
     if (empty($this->foreignKeyColumn)) {
         $this->foreignKeyColumn = \Simplify\Inflector::singularize($this->getTable()) . '_' . $this->getReferenceColumn();
     }
     return $this->foreignKeyColumn;
 }
Пример #6
0
 /**
  *
  * @return string
  */
 public function getValueField()
 {
     if (empty($this->valueField)) {
         $this->valueField = Inflector::singularize($this->getTable()) . '_value';
     }
     return $this->valueField;
 }