/** * * @return string */ public function getSortField() { if (empty($this->sortField)) { $this->sortField = \Simplify\Inflector::singularize($this->getTable()) . '_order'; } return $this->sortField; }
/** * 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; }
/** * * @return string */ public function getPrimaryKey() { if (empty($this->primaryKey)) { $this->primaryKey = Inflector::singularize($this->getTable()) . Form::ID; } return $this->primaryKey; }
/** * * @return string */ public function getRight() { if (empty($this->right)) { $this->right = \Simplify\Inflector::singularize($this->getTable()) . '_right'; } return $this->right; }
/** * * @return string */ public function getForeignKeyColumn() { if (empty($this->foreignKeyColumn)) { $this->foreignKeyColumn = \Simplify\Inflector::singularize($this->getTable()) . '_' . $this->getReferenceColumn(); } return $this->foreignKeyColumn; }
/** * * @return string */ public function getValueField() { if (empty($this->valueField)) { $this->valueField = Inflector::singularize($this->getTable()) . '_value'; } return $this->valueField; }