Download the PHP package cnp/pattern-library without Composer

On this page you can find all versions of the php package cnp/pattern-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pattern-library

WordPress PHP Pattern Library

A PHP library of WordPress atoms and organisms engineered for writing standardized markup quickly. Most atoms include a WordPress template tag and the markup to surround the content returned from the template tag. For instance, the atom PostTitle returns content from the WordPress function the_title();, contained inside an h2 tag by default.

Every piece of the atom, from the tag to the content is configurable in the atom arguments, and can be filtered separately if access to the main arguments is not available. Finally, atoms can stack together to form organisms, which makes writing markup for a WordPress theme faster and cleaner. This way, you won't have to contend with a forest of open and close PHP tags, or odd indenting and bizarre if statement nesting. All of these things distract from the heart of the markup: the content. The WordPress Pattern Library brings clarity to markup.

Atoms

The AtomTemplate class is a way of defining common atom arguments. The method getMarkup uses the CNP/Atom class to assemble the markup. Named atoms can also create and use atom-specific arguments if necessary (see PostThumbnail).

Atom Documentation

Link

A standard link.

Parameters:
Uses:

PostLink

Extends: Link

A link to a post.

Parameters:
Uses:

FrontPageLink

Extends: Link

A link to the front page.

Parameters:
Uses:

SiteTitleFrontPageLink

A link to the front page with the site title as its content.

Parameters:
Uses:

PostsPageLink

Extends: Link

A link to the posts page.

Parameters:
Uses:

FacebookShare

Extends: Link

A Facebook sharing link.

Parameters:
Uses:

TwitterShare

Extends: Link

A Twitter sharing link.

Parameters:
Uses:

EmailShare

Extends: Link

An Email sharing link.

Parameters:
Uses:

Excerpt

Uses the manual post excerpt from the post object.

Parameters:
Uses:

ExcerptForce

Extends: Excerpt

Either the post excerpt, or the beginning of the post.

Parameters:
Uses:

ExcerptSearch

Extends: Excerpt

A specialized excerpt for search result pages that highlights the searched-for term.

Parameters:
Uses:

PostClass

Returns an <article> with the post classes.

Parameters:
Uses:

PostThumbnail

Returns a post thumbnail.

Parameters:
Uses:

PostTitle

Returns an h2 with the title.

Parameters:
Uses:

PostTitleLink

Extends: PostTitle

Returns a PostTitle with a PostLink.

Parameters:
Uses:

CategoryList

Returns a list of post categories.

Parameters:
Uses:

Loop

Uses vsprintf to run through a simple loop.

Parameters:
Uses:

SchemaAddress

Parameters:
Uses:

PostDate

Returns a formatted post date

Parameters:
Uses:

EventDate

A complicated atom that returns an event date. It works for both Tzolkin or The Events Calendar.

Parameters:
Uses:
Filters:

EventBadge

Extends: EventDate

Returns an event "badge," i.e., a month/day block that displays the event's start date.

Parameters:
Uses:
Filters:

TaxonomyList

Returns a list of taxonomy terms assigned to a specific post. Use for custom taxonomies.

Parameters:
Uses:

ListTerms

Returns an unordered list of taxonomy terms.

Parameters:
Uses:
Filters:

ListPages

Returns an unordered list of pages.

Parameters:
Uses:
Filters:

PostAuthor

Displays the post author's name.

Parameters:
Uses:

Menu

Returns a wp_nav_menu.

Parameters:
Uses:

Image

Returns a responsive image.

Parameters:
Uses:

ContentSourceLink

A link that is output on the front-end to provide quicker editing access for content areas.

Parameters:
Uses:

BackgroundVideo

Returns a Vide-enabled background video.

Parameters:
Uses:

PostTermLinkSingle

Returns a single post term. Useful in situations where the design has room for one term, but multiple terms are possible due to improper content entry.

Parameters:
Uses:

Organisms

The OrganismTemplate class is the starting point for multi-atom markup. Using a structure array, we can pass in named or generic atoms that need to be wrapped up in an organism.

Like AtomTemplate, the OrganismTemplate class has a getMarkup method that loops through the markup array and compiles the organism's markup.

The properties available in the OrganismTemplate class are:

Structure

You must write the structure array in a specific way in order for it to nest correctly.

In additional to children and parts, the value is also used to pass in ordinary atom arguments. There is a shorthand for class that makes adding a specific CSS class easier.

Organism Examples

Simple

Input

Output

Nesting using Posts, Children and Parts

Input

Output


All versions of pattern-library with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cnp/pattern-library contains the following files

Loading the files please wait ....