Register Taxonomy

Uses extended-cpts if available.
@see https://github.com/johnbillion/extended-cpts

@return void
542519
protected function register()
    {
        if (function_exists('register_extended_taxonomy')) {
            register_extended_taxonomy($this->name, $this->links, $this->args);
        } else {
            register_taxonomy($this->name, $this->links, $this->args);
        }
    }
51538
public function register()
    {
        foreach ($this->postTypes as $postType) {
            $this->app['posts.types']->register($postType);
            $this->app['filters']->listen(
                'theme_' . strtolower(class_basename($postType)) . '_templates',
                function ($page_templates) use ($postType) {
                    $laraPressTemplates = [];

                    foreach ($postType::getAvailableTemplates() as $key => $template) {
                        if (is_int($key)) {
                            $key = $template;
                            $template = ucwords(str_replace('-', ' ', $template));
                        }
                        $laraPressTemplates[$key] = $template;
                    }

                    return array_merge($page_templates, $laraPressTemplates);
                }
            );
        }
    }
1021848
def register(template_class,*extensions):
		'''  '''
		for ext in extensions:
			ext = normalize(ext)
			if not Lean.template_mappings.has_key(ext):
				Lean.template_mappings[ext] = []

			Lean.template_mappings[ext].insert(0,template_class)
			Lean.template_mappings[ext] = unique(Lean.template_mappings[ext])
693209
public function registerCustomTypes(): void
    {
        // already registered
        if (\Doctrine\DBAL\Types\Type::hasType('neuralyzer_enum')) {
            return;
        }

        // Else register
        // Manage specific types such as enum
        \Doctrine\DBAL\Types\Type::addType(
            'neuralyzer_enum',
            'Edyan\Neuralyzer\Doctrine\Type\Enum'
        );
        $platform = $this->conn->getDatabasePlatform();
        $platform->registerDoctrineTypeMapping('enum', 'neuralyzer_enum');
        $platform->registerDoctrineTypeMapping('bit', 'boolean');
    }
474282
def register(self, extension, extension_name):
        
        self._extensions[extension_name] = extension
        self.ROUTES.extend([
            tuple(list(t) + [extension_name])
            for t in extension.ROUTES
        ])
        self.CACHED.extend([
            (f_name, extension_name)
            for f_name in extension.CACHED
        ])

        # This order allows for user defaults to overwrite extension ones
        self.Access_Control_Allow_Methods.update({
            k: v
            for k, v in extension.Access_Control_Allow_Methods.items()
            if k not in self.Access_Control_Allow_Methods
        })
1018431
public function registerTaxonomies()
    {

        if (!function_exists('register_taxonomy')) {
            return;
        }

        $this->taxonomies->rewind();
        while ($this->taxonomies->valid()) {

            $taxonomy = $this->taxonomies->current();
            register_taxonomy($taxonomy->getName(), $taxonomy->getSupportedPostTypes(), $taxonomy->getArgs());
            $this->taxonomies->next();

        }

    }
1101015
public function register()
    {
        $this->app['actions']->listen('wp', function () {
            $wpPost = get_post(
                (is_home() && is_archive()) && !is_post_type_archive() ?
                    get_option('page_for_posts') :
                    null
            ); // for post archive get post page instead of first post

            if ($wpPost !== null && $post = Post::resolveWordPressPostToModel($wpPost)) {
                $this->app->instance('post', $post);
            }
        });

        $this->registerLoopAndQuery();
        $this->registerPostManager();
        $this->registerPostTypeManager();
    }
139149
public function register()
    {
        $prefix = 'Rocket\Taxonomy\Repositories';
        $this->app->bind("$prefix\TermRepositoryInterface", "$prefix\TermRepository");
        $this->app->bind("$prefix\TermHierarchyRepositoryInterface", "$prefix\TermHierarchyRepository");

        $this->app['taxonomy'] = $this->app->share(
            function ($app) {
                return $app->make('\Rocket\Taxonomy\Taxonomy');
            }
        );
    }
805406
private static function register_extensions( $post_type, $args ) {
		if ( isset( $args['name_singular'] ) ) {
			( new Post_Type_Labels( $post_type, $args['name_singular'], $args['name_plural'] ) )->init();
		}

		if ( isset( $args['query'] ) ) {
			( new Post_Type_Query( $post_type, $args['query'] ) )->init();
		}

		if ( isset( $args['admin_columns'] ) ) {
			( new Post_Type_Columns( $post_type, $args['admin_columns'] ) )->init();
		}

		if ( isset( $args['page_for_archive'] ) ) {
			( new Post_Type_Page(
				$post_type,
				$args['page_for_archive']['post_id'],
				$args['page_for_archive']
			) )->init();
		}
	}
191842
public void registerExtension(ExtensionNamespaceSupport extNsSpt)
  {
    String namespace = extNsSpt.getNamespace();
    if (namespaceIndex(namespace, m_extensions) == -1)
    {
      m_extensions.add(extNsSpt);
      if (m_unregisteredExtensions.contains(namespace))
        m_unregisteredExtensions.remove(namespace);
    }
    
  }
294437
public function registerExtensions()
    {
        // register extensions
        $extensions = $this->servicesByTag('Smarty.Extension', SmartyExtensionInterface::class);

        /**
         * @var $e SmartyExtensionInterface
         */
        if (count($extensions) > 0) {
            $methods = get_class_methods(SmartyExtensionInterface::class);
            foreach ($extensions as $e) {
                foreach ($methods as $m) {
                    if ($m != 'getName') {
                        $plugins = $e->{$m}();
                        foreach ($plugins as $p) {
                            $this->registerPlugin($p);
                        }
                    }
                }
            }
        }
    }
422378
def register(self, klass, callback, name="default"):
        
        if klass not in self._definitions:
            self._definitions[klass] = {}

        self._definitions[klass][name] = callback
682700
public function registerFilesets() {
    // @todo Assert that filesets from \Acquia\Blt\Custom\Filesets override
    // those from \Acquia\Blt\Custom\Filesets.
    $classes = [
      // @codingStandardsIgnoreStart
      \Acquia\Blt\Robo\Filesets\Filesets::class,
      \Acquia\Blt\Custom\Filesets::class,
      // @codingStandardsIgnoreEnd
    ];
    $fileset_annotations = $this->getAllFilesetAnnotations($classes);
    $filesets = $this->getFilesetsFromAnnotations($fileset_annotations);

    $this->filesets = $filesets;
  }
858915
protected function registerTaxonomy()
    {
        if (! $this->isRegistered()) {
            $parameters = array_merge([
                'labels' => $this->getModel()->getLabels(),
                'rewrite' => ['slug' => $this->getModel()->getSlug()],
            ], $this->getModel()->getArguments());

            return register_taxonomy(
                $this->getModel()->getSlug(),
                $this->getBelongsTo(),
                $parameters
            );
        }

        throw new TaxonomyException("Taxonomy [{$this->model->getSlug()}] already exsist.");
    }
1010604
public function register() {
		if ($this->registered) {
			require_once __DIR__ . '/Exceptions/RegisterationFailed.php';
			throw new RegistrationFailed('Is already registered');
		}
		
		if ($this->namespaces->isEmpty()) {
			require_once __DIR__ . '/Exceptions/RegisterationFailed.php';
			throw new RegistrationFailed('No namespaces was registered');
		}
		
		spl_autoload_register(function($class) {
			foreach ($this->namespaces as $definition) {
				if (strpos($class, $definition->namespace) === 0) {
					$resolvedClass = substr($class, strlen($definition->namespace));
					
					if ($this->loadClass($resolvedClass, $definition->dirs)) {
						return;
					}
				}
			}
			
			if (! $this->dirs->isEmpty()) {
				$this->loadClass('\\' . $class, $this->dirs);
			}
		});
		
		$this->registered = true;
	}
335142
public function registerPostType()
    {
        // create options for the PostType
        $options = $this->createOptions();

        // check that the post type doesn't already exist
        if (!post_type_exists($this->name)) {
            // register the post type
            register_post_type($this->name, $options);
        }
    }
1123357
public function registerMailLayouts(array $definitions)
    {
        if (!$this->registeredLayouts) {
            $this->registeredLayouts = [];
        }

        $this->registeredLayouts = $definitions + $this->registeredLayouts;
    }