• File: user.php
  • Full Path: /home/dealkatnwc/www/wp-content/plugins/types/application/models/field/group/user.php
  • Date Modified: 02/11/2019 2:36 PM
  • File size: 731 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

/**
 * User field group.
 *
 * @since 2.0
 */
class Types_Field_Group_User extends Types_Field_Group {


	const POST_TYPE = 'wp-types-user-group';


	/**
	 * @param WP_Post $field_group_post Post object representing a user field group.
	 * @throws InvalidArgumentException
	 */
	public function __construct( $field_group_post ) {
		parent::__construct( $field_group_post );
		if( self::POST_TYPE != $field_group_post->post_type ) {
			throw new InvalidArgumentException( 'incorrect post type' );
		}
	}


	/**
	 * @return WPCF_Field_Definition_Factory Field definition factory of the correct type.
	 */
	protected function get_field_definition_factory() {
		return WPCF_Field_Definition_Factory_User::get_instance();
	}


}