2017 © Pedro Peláez
 

library propel-publishable-behavior

image

willdurand/propel-publishable-behavior

  • Tuesday, February 4, 2014
  • by couac
  • Repository
  • 3 Watchers
  • 10 Stars
  • 14,687 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 3 % Grown

The README.md

PublishableBehavior

Build Status, (*1)

The PublishableBehavior is designed to quickly add publish/unpublish features to your model., (*2)

Installation

Install the behavior in your project, the recommended way is to use Composer:, (*3)

``` json { "require": { "willdurand/propel-publishable-behavior": "dev-master" } }, (*4)


Add the following line to your `propel.ini` or `build.properties` configuration file: ``` ini propel.behavior.publishable.class = vendor.willdurand.propel-publishable-behavior.src.PublishableBehavior

Note: vendor.willdurand.propel-publishable-behavior.src is the path of the behavior in dot-path notation., (*5)

Usage

ActiveRecord API

Returns true if the object is published, false otherwise:, (*6)

isPublished()

Mark an object as published:, (*7)

publish(PropelPDO $con = null)

Mark an object as not published:, (*8)

unpublish(PropelPDO $con = null)

Has publication frame started ?, (*9)

hasPublicationEnded()

Has publication frame started ?, (*10)

hasPublicationStarted()

ActiveQuery API

Include unpublished objects in the results set:, (*11)

includeUnpublished()

Filter by objects not published exclusively:, (*12)

filterUnpublished()

Filter by objects published exclusively:, (*13)

filterPublished()

Filter by publication active, (*14)

filterByPublicationActive($date = 'now')

Mark an object as published:, (*15)

publish(PropelPDO $con = null)

Mark an object as not published:, (*16)

unpublish(PropelPDO $con = null)

Parameters

``` xml , (*17)


> Note: Parameter `include_unpublished` allows you to exclude unpublished object from each query. It is setup to `false` by default. If you don't want to exclude unpublished items, you have to set it to `true` Running tests ------------- First of all, copy the `phpunit.xml.dist` to `phpunit.xml`. If you did not install propel with composer, change `PROPEL_DIR` and `PHING_DIR` values to customize the include path. Customize autoloader by changing `AUTOLOAD` property. then simply launch ``` bash $ vendor/bin/phpunit -c phpunit.xml

All green?, (*18)

Credits

The Versions

04/02 2014

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires

behavior propel publishable

04/02 2014

1.2.0

1.2.0.0

  Sources   Download

The Requires

 

The Development Requires

behavior propel publishable

17/08 2013

1.1.0

1.1.0.0

  Sources   Download

The Requires

 

The Development Requires

behavior propel publishable

13/09 2012

1.0.2

1.0.2.0

  Sources   Download

The Requires

 

behavior propel publishable

10/06 2012

1.0.1

1.0.1.0

  Sources   Download

The Requires

 

behavior propel publishable

12/05 2012

1.0.0

1.0.0.0

  Sources   Download

The Requires

 

behavior propel publishable