tp TouchPointWP Involvement_PostTypeSettings - TenthPres/TouchPoint-WP GitHub Wiki

tp\TouchPointWP\Involvement_PostTypeSettings

Contains the settings for a single Involvement Post Type. This is instantiated as an array of these objects.


  • Full name: \tp\TouchPointWP\Involvement_PostTypeSettings

Constants

Constant Visibility Type Value
POST_TYPE_PREFIX public "inv_"

Methods

instance

final public static instance(): \tp\TouchPointWP\Involvement_PostTypeSettings[]
  • This method is static.* This method is final.

__construct

public __construct(object $o): mixed

Parameters:

Parameter Type Description
$o object

getAllDivs

Get a list of all division IDs that are being imported by all types.

public static getAllDivs(): int[]
  • This method is static.

postTypeWithPrefix

Get the Post Type for use with WordPress functions

public postTypeWithPrefix(): string

postTypeWithoutPrefix

Get the Post Type without the hook prefix.

public postTypeWithoutPrefix(): string

__get

public __get(mixed $what): mixed

Parameters:

Parameter Type Description
$what mixed

getPostTypes

Gets an array of the postType strings.

final public static getPostTypes(): string[]
  • This method is static.* This method is final.

getPostTypesWithGeoEnabled

Gets an array of the postType strings for post type that use Geo.

final public static getPostTypesWithGeoEnabled(): string[]
  • This method is static.* This method is final.

getForInvType

Gets the Involvement Post Type Settings object for a given inv type.

public static getForInvType(string $postType): \tp\TouchPointWP\Involvement_PostTypeSettings|null
  • This method is static. Parameters:
Parameter Type Description
$postType string

validateNewSettings

public static validateNewSettings(string $new): string
  • This method is static. Parameters:
Parameter Type Description
$new string

leaderTypeInts

Get the leader member types, as an array of ints

public leaderTypeInts(): int[]

hostTypeInts

Get the host member types, as an array of ints. Will be null if useGeo is false.

public hostTypeInts(): ?int[]