Msieprawski\ResourceTable\ResourceTable::validColumnType PHP Method

validColumnType() public static method

Returns array with valid column type options
public static validColumnType ( string $type ) : boolean
$type string
return boolean
    public static function validColumnType($type)
    {
        return in_array($type, ['string', 'select']);
    }

Usage Example

Example #1
0
 /**
  * Returns column search type (if valid and provided)
  *
  * @return string
  */
 public function searchType()
 {
     return isset($this->_data['type']) && ResourceTable::validColumnType($this->_data['type']) ? $this->_data['type'] : ResourceTable::DEFAULT_COLUMN_TYPE;
 }