2017 © Pedro Peláez
 

library propel-publishable-behavior

image

smirik/propel-publishable-behavior

  • Friday, August 16, 2013
  • by smirik
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % 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

16/08 2013

dev-master

9999999-dev

  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