Get the post type config
@return array
777171
public function getPostTypeConfig()
    {
        if (in_array($this->getPostType(), array('post', 'page'))) {
            return null;
        }
        
        return array(
            'labels' => array(
                'name'              => _x($this->getPlural(), 'post type general name'),
                'singular_name'     => _x($this->getSingular(), 'post type singular name'),
                'add_new'           => _x('Add New', $this->getSingular()),
                'add_new_item'      => __(sprintf('Add New %s', $this->getSingular())),
                'edit_item'         => __(sprintf('Edit %s', $this->getSingular())),
                'new_item'          => __(sprintf('New %s', $this->getPlural())),
                'view_item'         => __(sprintf('View %s', $this->getSingular())),
                'search_items'      => __(sprintf('Search %s', $this->getPlural())),
                'not_found'         => __(sprintf('No %s found', $this->getPlural())),
                'not_found_in_trash'=> __(sprintf('No %s found in Trash', $this->getPlural())),
                'parent_item_colon' => ''
            ),
            'hierarchical'        => $this->getHierarchical(),
            'public'              => $this->getPublic(),
            'supports'            => $this->getSupports(),
            'show_in_menu'        => $this->getShowInMenu(),
            'show_in_admin_bar'   => $this->getShowInAdminBar(),
            'menu_icon'           => $this->getMenuIcon(),
            'menu_position'       => $this->getMenuPosition(),
            'exclude_from_search' => $this->getExcludeFromSearch(),
            'has_archive'         => $this->getHasArchive(),
            'rewrite'             => $this->getRewrite(),
            'publicly_queryable'  => $this->getPubliclyQueryable(),
        );
    }
59666
public function getConfig()
    {
        return [
            'validators' => [
                'aliases'   => [
                    'consonant'            => Consonant::class,
                    'Consonant'            => Consonant::class,
                    'dateage'              => DateAge::class,
                    'dateAge'              => DateAge::class,
                    'DateAge'              => DateAge::class,
                    'ein'                  => Ein::class,
                    'Ein'                  => Ein::class,
                    'foldername'           => FolderName::class,
                    'folderName'           => FolderName::class,
                    'FolderName'           => FolderName::class,
                    'iataairlinecode'      => IataAirlineCode::class,
                    'iataAirlineCode'      => IataAirlineCode::class,
                    'IataAirlineCode'      => IataAirlineCode::class,
                    'iban'                 => Iban::class,
                    'Iban'                 => Iban::class,
                    'integer'              => Integer::class,
                    'Integer'              => Integer::class,
                    'luhn'                 => Luhn::class,
                    'Luhn'                 => Luhn::class,
                    'notinarray'           => NotInArray::class,
                    'notInArray'           => NotInArray::class,
                    'NotInArray'           => NotInArray::class,
                    'nowhitespace'         => NoWhitespace::class,
                    'noWhitespace'         => NoWhitespace::class,
                    'NoWhitespace'         => NoWhitespace::class,
                    'number'               => Number::class,
                    'Number'               => Number::class,
                    'password'             => Password::class,
                    'Password'             => Password::class,
                    'postcode'             => PostCode::class,
                    'postCode'             => PostCode::class,
                    'PostCode'             => PostCode::class,
                    'routingtransitnumber' => RoutingTransitNumber::class,
                    'routingTransitNumber' => RoutingTransitNumber::class,
                    'RoutingTransitNumber' => RoutingTransitNumber::class,
                    'ssn'                  => Ssn::class,
                    'Ssn'                  => Ssn::class,
                    'swift'                => Swift::class,
                    'Swift'                => Swift::class,
                    'username'             => Username::class,
                    'Username'             => Username::class,
                    'vatiN'                => VatIN::class,
                    'vatIN'                => VatIN::class,
                    'VatIN'                => VatIN::class,
                    'filecrc32'            => File\Crc32::class,
                    'fileCrc32'            => File\Crc32::class,
                    'FileCrc32'            => File\Crc32::class,
                    'filename'             => File\FileName::class,
                    'fileName'             => File\FileName::class,
                    'FileName'             => File\FileName::class,
                    'fileimagesize'        => File\ImageSize::class,
                    'fileImageSize'        => File\ImageSize::class,
                    'FileImageSize'        => File\ImageSize::class,
                    'fileiscompressed'     => File\IsCompressed::class,
                    'fileIsCompressed'     => File\IsCompressed::class,
                    'FileIsCompressed'     => File\IsCompressed::class,
                    'fileisimage'          => File\IsImage::class,
                    'fileIsImage'          => File\IsImage::class,
                    'FileIsImage'          => File\IsImage::class,
                    'filemd5'              => File\Md5::class,
                    'fileMd5'              => File\Md5::class,
                    'FileMd5'              => File\Md5::class,
                    'filemimetype'         => File\MimeType::class,
                    'fileMimeType'         => File\MimeType::class,
                    'FileMimeType'         => File\MimeType::class,
                    'filesha1'             => File\Sha1::class,
                    'fileSha1'             => File\Sha1::class,
                    'FileSha1'             => File\Sha1::class,
                    'filesize'             => File\Size::class,
                    'fileSize'             => File\Size::class,
                    'FileSize'             => File\Size::class,
                    'filewordcount'        => File\WordCount::class,
                    'fileWordCount'        => File\WordCount::class,
                    'FileWordCount'        => File\WordCount::class
                ],
                'factories' => [
                    Consonant::class            => InvokableFactory::class,
                    DateAge::class              => InvokableFactory::class,
                    Ein::class                  => InvokableFactory::class,
                    FolderName::class           => InvokableFactory::class,
                    IataAirlineCode::class      => InvokableFactory::class,
                    Iban::class                 => InvokableFactory::class,
                    Integer::class              => InvokableFactory::class,
                    Luhn::class                 => InvokableFactory::class,
                    NotInArray::class           => InvokableFactory::class,
                    NoWhitespace::class         => InvokableFactory::class,
                    Password::class             => InvokableFactory::class,
                    RoutingTransitNumber::class => InvokableFactory::class,
                    Ssn::class                  => InvokableFactory::class,
                    Swift::class                => InvokableFactory::class,
                    Username::class             => InvokableFactory::class,
                    VatIN::class                => InvokableFactory::class,
                    File\Crc32::class           => InvokableFactory::class,
                    File\FileName::class        => InvokableFactory::class,
                    File\ImageSize::class       => InvokableFactory::class,
                    File\IsCompressed::class    => InvokableFactory::class,
                    File\IsImage::class         => InvokableFactory::class,
                    File\Md5::class             => InvokableFactory::class,
                    File\MimeType::class        => InvokableFactory::class,
                    File\Sha1::class            => InvokableFactory::class,
                    File\Size::class            => InvokableFactory::class,
                    File\WordCount::class       => InvokableFactory::class
                ]
            ]
        ];
    }
1225536
public function getTypes()
    {
        $types = $this->config()->get('types');

        if ($this->allowed_types) {
            // Prioritise local field over global settings
            $allowed_types = $this->allowed_types;
        }
        if ($allowed_types = $this->config()->get('allowed_types')) {
           foreach ($allowed_types as $type) {
                if (!array_key_exists($type, $types)) {
                    user_error("{$type} is not a valid link type");
                }
            }

            foreach (array_diff_key($types, array_flip($allowed_types)) as $key => $value) {
                unset($types[$key]);
            }
        }
        $this->extend('updateTypes', $types);
        return $types;
    }
59029
public function formInputConfig()
    {
        $formConfig = parent::formInputConfig();

        if (!array_key_exists('options', $formConfig)) {
            $options = $this->config('options');
            $finder = $this->config('finder');
            if (!empty($options) && is_array($options)) {
                $formConfig['options'] = $options;
            } elseif ($this->_allowedEmptyOptions()) {
            } elseif (!empty($finder)) {
                $formConfig['options'] = $finder;
            }
        }

        return $formConfig;
    }
811652
public static function getConfiguration(): array
    {
        static $configuration;
        if (\is_array($configuration)) {
            return $configuration;
        }
        if (VersionNumberUtility::convertVersionStringToArray(VersionNumberUtility::getCurrentTypo3Version())['version_main'] < 9) {
            $configuration = isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['staticfilecache']) ? (array)\unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['staticfilecache']) : [];
        } else {
            $configuration = (array)GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('staticfilecache');
        }

        return $configuration;
    }
1030666
public function get_post_type($post_type){
    global $wpdb;

    $query = $wpdb->prepare( "SELECT * FROM ".MF_TABLE_POSTTYPES." WHERE type = %s", array( $post_type ) );

    $post_type = $wpdb->get_row( $query, ARRAY_A );
    if($post_type){
      $post_type_id = $post_type['id'];
      $post_type = unserialize($post_type['arguments']);
      $post_type['core']['id'] = $post_type_id;
      return $post_type;
    }
    return false;
  }
189711
private function _get_post_types(){
    global $wpdb;

    $query = sprintf('SELECT * FROM %s ORDER BY id',MF_TABLE_POSTTYPES);
    $posttypes = $wpdb->get_results( $query, ARRAY_A );
    return $posttypes;
  }
549704
public function getRequestedPostType()
    {
        if (!is_a($this->query, 'WP_Query')) {
            return null;
        }

        if (isset($this->query->query) && isset($this->query->query['post_type'])) {
            return $this->data['post_type'] = $this->query->query['post_type'];
        } else {
            return $this->data['post_type'] = null;
        }
    }
181923
public function getConfig(): array
	{
		global $txt, $modSettings;

		$file = $this->_app->boardDir .'/_config'. $this->_app->name .'.json';

		// Already loaded or does not use config?
		if ($this->_config || !$this->_app->useConfig)
			return $this->_config;

		// Check for a $modSettings key first.
		if (!empty($modSettings['_config'. $this->_app->name]))
			return $this->_config = smf_json_decode($modSettings['_config'. $this->_app->name], true);

		// Get the json file. Must be located in $boarddir folder.
		if (!$this->_config && !file_exists($file))
		{
			loadLanguage('Errors');
			log_error(sprintf($txt['error_bad_file'], $file));
		}

		else
			$this->_config = smf_json_decode(file_get_contents($file), true);

		return $this->_config;
	}
874390
protected function getPostTypeObject()
    {
        if ($this->postTypeObj === null) {
            $this->postTypeObj = get_post_type_object($this->getType());
        }

        return $this->postTypeObj;
    }
265077
public function get_custom_post_type( $post_type ) {
		if ( ! $this->is_valid_custom_post_type( $post_type ) ) {
			return null;
		}

		$custom_posts = $this->get_custom_posts();

		return $custom_posts[ $post_type ];
	}
327863
function ctc_post_type_options() {

		$options = array();

		// Get supported post types with archives
		$post_types = get_post_types( array(
			'public'		=> true,
			'show_ui'		=> true, // theme support or plugin settings may set false
			'has_archive'	=> true
		), 'objects' );

		// Loop post types
		foreach ( $post_types as $post_type_slug => $post_type_object ) {

			$post_type_name = $post_type_object->labels->name;

			// Add to array
			$options[$post_type_slug] = $post_type_name;

		}

		// Add blog post type with special name (has_archive excludes it)
		$options = array_merge(
			array(
				'post' => _x( 'Blog', 'archives widget', 'church-theme-framework' )
			),
			$options
		);

		// Return filtered
		return apply_filters( 'ctc_archives_widget_post_type_options', $options );

	}
1281786
private function createPostTypes()
    {
        if(!$this->option('posts') && ($this->option('post_types') || $this->option('all'))) {
            $this->comment('Creating dummy Post Types...');
            $output = (new \PostTypeSeeder())
                ->setCommand($this)
                ->run($this->getDefaultOption('post_types'));
            $this->info($output);
        }
        return $this;
    }
648184
public function xTypeConfig()
    {
        $class = get_class($this);

        if (!isset(_XTypeTraitStorage::$typeCache[$class])) {
            $config = isset($this->xType) ? $this->xType : [];
            _XTypeTraitStorage::$typeCache[$class] = $this->bootXTypeConfig($config);
        }

        return _XTypeTraitStorage::$typeCache[$class];

    }
1023186
public function metaBoxPostTypes()
    {
	global $modularityOptions;
	$enabled = isset($modularityOptions['enabled-post-types']) && is_array($modularityOptions['enabled-post-types']) ? $modularityOptions['enabled-post-types'] : array();

	$postTypes = array_filter(get_post_types(), function ($item) {
	    $disallowed = array_merge(
		array_keys(\Modularity\ModuleManager::$available),
		array(
		    'attachment',
		    'revision',
		    'nav_menu_item',
		    'custom_css',
		    'customize_changeset'
		)
	    );

	    if (in_array($item, $disallowed)) {
		return false;
	    }

	    if (substr($item, 0, 4) == 'acf-') {
		return false;
	    }

	    return true;
	});

	include MODULARITY_TEMPLATE_PATH . 'options/partials/modularity-post-types.php';
    }
294894
protected function getPostObject(): array
    {
        $oInput             = Factory::service('Input');
        $oUserGroupModel    = Factory::model('UserGroup', 'nails/module-auth');
        $oUserPasswordModel = Factory::model('UserPassword', 'nails/module-auth');

        return [
            'slug'                  => $oInput->post('slug'),
            'label'                 => $oInput->post('label'),
            'description'           => $oInput->post('description'),
            'default_homepage'      => $oInput->post('default_homepage'),
            'registration_redirect' => $oInput->post('registration_redirect'),
            'acl'                   => $oUserGroupModel->processPermissions($oInput->post('acl')),
            'password_rules'        => $oUserPasswordModel->processRules($oInput->post('pw')),
        ];
    }
664099
public static function getTypes() {
        return array(
            self::TYPE_CHARACTER,
            self::TYPE_LOGICAL,
            self::TYPE_DATE ,
            self::TYPE_NUMERIC,
            self::TYPE_MEMO,
        );
    }