2017 © Pedro Peláez
 

library atlas

image

alpineio/atlas

  • Sunday, July 29, 2018
  • by moneal
  • Repository
  • 2 Watchers
  • 0 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

atlas

A Custom Post Type manager for WordPress. Extends Piklist and native WordPress functionality., (*1)

Synopsis

Piklist does a great job of adding datastructure to WordPress. About Piklist:, (*2)

"Piklist is a code-based framework, which means it has no user interface. We believe this is one of the biggest benefits to using Piklist. Code based systems allow you flexibility in your field configurations and development, and will save you time in the long run. With Piklist you can usually use the same code you have written in one section and use it in another, allowing you to copy and paste, and save tons of time.", (*3)

We agree with the benefits of a code-based, source-controlled application. But, we feel that copy-paste is not a sustainable model for large-scale application development., (*4)

Atlas is a layer over the copy/paste configuration model. A convenient, object-oriented layer for adding basic and custom functionality to extended post types using a style similar to Laravel., (*5)

As they say about Laravel, it is "an accessible, yet powerful system, providing tools needed for large, robust applications". We envision the same for Atlas in the WordPress ecosystem., (*6)

Code Example

Here is an example of an object being defined with a piklist-compatible data dictionary, and behavior inherited from posts., (*7)

namespace MyCRM;

use AlpineIO\Atlas\Contracts\SelfRegistration;
use AlpineIO\Atlas\Post;
use AlpineIO\Atlas\Traits\PiklistPostRegistration;
use AlpineIO\Atlas\Types\PostRelationFieldType;

/**
 * Class Contact
 * @package MyCRM
 * @property string $title Job Title
 * @property string $street_address Street Address
 * @property string $city City
 * @property string $state State
 * @property string $website Website URL
 * @property string $facebook Facebook URL
 * @property string $yelp Yelp URL
 */
class Contact extends Post implements SelfRegistration {

    use PiklistPostRegistration;

}

Next, we might use this CPT Contact within a WordPress single template:, (*8)

  use MyCRM\Contact;

  $contact = new Contact(get_the_ID());

All of our contact attributes and member functionality are available within this object for quick access and display in your WordPress template., (*9)

Building the data model with PikList

First, build your administrative interface with PikList:, (*10)

https://piklist.com/user-guide/tutorials/getting-started-with-piklist/, (*11)

then, extend it using Atlas., (*12)

Motivation

We love the spirit behind the PikList project. Though, we felt that to maintain large scale applications, we would need a more modern object structure. As users of Laravel, we missed the elegance and ease of use and felt we could help., (*13)

Installation

With Composer

$ composer require alpineio/atlas
{
    "require": {
        "alpineio/atlas": "~1.0.4"
    }
}
<?php
require 'vendor/autoload.php';
use AlpineIO\Atlas\Services\RegisterWordPressTypes;
use MyCRM\Contact;
use MyCRM\Team;

// Create a filter to return the classes
function my_crm_object_types( $types = [] ) {
    return array_merge( $types, [
        Contact::class,
        Team::class
    ] );
}
add_filter('alpineio_atlas_models', 'my_crm_object_types');

RegisterWordPressTypes::register();

Tests

Coming soon., (*14)

Contributors

We would welcome additional help on this project. Please feel free to fork and send pull requests., (*15)

License

GPL2, (*16)

The Versions

29/07 2018

dev-documentation

dev-documentation

  Sources   Download

25/06 2016

dev-master

9999999-dev

WordPress custom post type manager

  Sources   Download

The Requires

 

The Development Requires

25/06 2016

v1.0.8

1.0.8.0

WordPress custom post type manager

  Sources   Download

The Requires

 

The Development Requires

25/06 2016

v1.0.7

1.0.7.0

WordPress custom post type manager

  Sources   Download

The Requires

 

The Development Requires

07/06 2016

v1.0.6

1.0.6.0

WordPress custom post type manager

  Sources   Download

The Requires

 

The Development Requires

06/06 2016

v1.0.5

1.0.5.0

WordPress custom post type manager

  Sources   Download

The Requires

 

The Development Requires

01/06 2016

v1.0.4

1.0.4.0

WordPress custom post type manager

  Sources   Download

The Requires

 

27/05 2016

v1.0.3

1.0.3.0

WordPress custom post type manager

  Sources   Download

The Requires

 

27/05 2016

v1.0.2

1.0.2.0

WordPress custom post type manager

  Sources   Download

The Requires

 

26/05 2016

v1.0.1

1.0.1.0

WordPress custom post type manager

  Sources   Download

The Requires

 

25/05 2016

v1.0

1.0.0.0

WordPress custom post type manager

  Sources   Download

The Requires