# adminify/4.2.8/Inc/base-model.php

Adminify – White Label, Admin Menu Editor, Login Customizer, version 4.2.8. 26 lines.

- Page: https://pluginprobe.com/plugins/adminify/4.2.8/code/Inc/base-model.php
- Raw: https://pluginprobe.com/plugins/adminify/4.2.8/raw/Inc/base-model.php
- Modified: 2026-05-20T13:22:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/adminify/4.2.8/code/Inc/base-model.php#L10-L20`.

```php
<?php

namespace PXLBSAdminify\Inc;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

abstract class Base_Model extends Base_Data {

	protected function init( $data ) {
		$this->set( array_merge( $this->get_defaults(), $data ) );
	}

	public function get_default_field( $field ) {
		$fields = $this->get_defaults();
		return isset( $fields[ $field ] ) ? $fields[ $field ] : null;
	}

	public function __construct( $data ) {
		if ( $data ) {
			$this->init( $data );
		}
	}
}

```
