Model::db_columns( $options )

Modal valid database column


Parameters

$options

(Required)


Return

(array) Database Column


Source

File: Model/Model.php

	public function db_columns( $options ) {

		$columns = array_merge( get_object_vars( $this ), $this->columns );

		/**
		 * Filter default model properties as DB column which not required or not available in the actual DB table
		 *
		 * @since DozentLMS 1.0.0
		 */

		$db_column_except = apply_filters( 'dozent_db_columns_except',
			[ 'table', 'timestamp', 'columns', 'primaryKey', 'per_page' ] );

		$columns = dozent_array_except( $columns, $db_column_except );

		if ( dozent_count( $options ) ) {
			$columns = $options;
		}

		$columns = array_filter( $columns );

		return $columns;
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.