PHPackages                             hiromi2424/transition - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hiromi2424/transition

ActiveCakephp-plugin

hiromi2424/transition
=====================

Transition component is a CakePHP component to help your transitional pages logic.

2.0(11y ago)4558.0k↓12%13MITPHP

Since Nov 14Pushed 11y ago9 watchersCompare

[ Source](https://github.com/hiromi2424/TransitionComponent)[ Packagist](https://packagist.org/packages/hiromi2424/transition)[ Docs](https://github.com/hiromi2424/TransitionComponent)[ RSS](/packages/hiromi2424-transition/feed)WikiDiscussions cake2 Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Transition Component
====================

[](#transition-component)

[![Build Status](https://camo.githubusercontent.com/5c0ceb2f2589d7e42ab77403654bc3cd135f461a85fde77011ea8ac60df1341a/68747470733a2f2f7472617669732d63692e6f72672f6869726f6d69323432342f5472616e736974696f6e436f6d706f6e656e742e706e673f6272616e63683d63616b6532)](https://travis-ci.org/hiromi2424/TransitionComponent)

Version
-------

[](#version)

This was versioned as 2.0.

Introduction
------------

[](#introduction)

Transition component is a CakePHP component to help your transitional pages logic.

- For instance, this bears most wizard parts.
- In almost every case, your method for action can be one-liner as like following codes: public function action(){ $this-&gt;Transition-&gt;automate('previous\_action', 'next\_action'); }

Requirements
------------

[](#requirements)

- CakePHP &gt;= 2.0
- PHP &gt;= 5.2.6

Recommended:

- CakePHP &gt;= 2.1
- PHP &gt;= 5.3.2

Setup
-----

[](#setup)

```
cd /path/to/root/app/Plugin # or /path/to/root/plugins
git clone git://github.com/hiromi2424/TransitionComponent.git Transition

```

Or:

```
cd /path/to/your_repository
git submodule add git://github.com/hiromi2424/TransitionComponent.git plugins/Transition

```

Notice
------

[](#notice)

This component will store any request data into session by default. It means you will have to revalidate all of(or merged)data when saving into your database. However, you can also use "saveDataWhenInvalid" option to not store data when validation was failed.

Summary
-------

[](#summary)

- checkData() is to check data(if given) with model validation and auto redirecting
- checkPrev() is to check previous page's session data exists.
- automate() is convenient method for checkData() and checkPrev().

Examples
--------

[](#examples)

1. Simple Wizard Form

    ```
     class UsersController extends AppController{

     	public $components = array('Transition.Transition');

     	// base of user information
     	public function register() {

     		// give a next action name
     		$this->Transition->checkData('register_enquete');

     	}

     	// input enquete
     	public function register_enquete() {

     		$this->Transition->automate(
     			'register', // previous action to check
     			'register_confirm', // next action
     			'Enquete' // model name to validate
     		);

     	}

     	// confirm inputs
     	public function register_confirm() {

     		$this->Transition->automate(
     			'register_enquete', // prev
     			'register_save', // next
     			array(
     				'validationMethod' => 'validateCaptcha', // virtual function to validate with captcha
     			)
     		 );

     		$this->set('data', $this->Transition->allData());
     		$this->set('captcha', createCaptcha()); // virtual function to create a captcha

     	}

     	// stroring inputs
     	public function register_save() {

     		// As like this, multi action name can be accepted
     		$this->Transition->checkPrev(array(
     			'register',
     			'register_enquete',
     			'register_confirm'
     		));

     		// mergedData() returns all session data saved on the actions merged
     		if ($this->User->saveAll($this->Transition->mergedData()) {

     			// Clear all of session data TransitionComponent uses
     			$this->Transition->clearData();
     			$this->Session->setFlash(__('Registration complete !!', true));
     			$this->redirect(array('action' => 'index'));

     		} else {

     			$this->Session->setFlash(__('Registration failed ...', true));
     			$this->redirect(array('action' => 'register'));

     		}

     	}

     }

    ```
2. Transition among two Controllers

    ```
     class FirstController extends AppContoller {

     	public $components = array('Transition.Transition');

     	public function one() {
     		$this->Transition->checkData(array('controller' => 'second', 'action' => 'two'));
     	}

     	public function three() {
     		$this->Transition->checkPrev(array(
     			'one',
     			array('controller' => 'second', 'action' => 'two')
     		));
     	}

     }

     class SecondController extends AppContoller {

     	public $components = array('Transition.Transition');

     	public function two() {
     		$this->Transition->automate(
     			array('controller' => 'first', 'action' => 'one'),
     			array('controller' => 'first', 'action' => 'three')
     		);
     	}
     }

    ```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 74.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4203d ago

Major Versions

1.1 → 2.02014-11-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/e122a99dc7f41f91d17a191048ef65529fde0b76ebdecc66bea529363b65429b?d=identicon)[k1LoW](/maintainers/k1LoW)

![](https://www.gravatar.com/avatar/4fe1202888a1e909332ee0eda4eb3c017e5ae58912e9777146c97bb61f126ee8?d=identicon)[hiromi2424](/maintainers/hiromi2424)

---

Top Contributors

[![k1LoW](https://avatars.githubusercontent.com/u/57114?v=4)](https://github.com/k1LoW "k1LoW (23 commits)")[![hiromi2424](https://avatars.githubusercontent.com/u/191297?v=4)](https://github.com/hiromi2424 "hiromi2424 (7 commits)")[![oppara](https://avatars.githubusercontent.com/u/10661?v=4)](https://github.com/oppara "oppara (1 commits)")

---

Tags

cakephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hiromi2424-transition/health.svg)

```
[![Health](https://phpackages.com/badges/hiromi2424-transition/health.svg)](https://phpackages.com/packages/hiromi2424-transition)
```

###  Alternatives

[cakedc/migrations

Migrations Plugin for CakePHP

3391.1M63](/packages/cakedc-migrations)[slywalker/boost_cake

BoostCake is a plugin for CakePHP using Bootstrap

277511.0k1](/packages/slywalker-boost-cake)[chronon/mobile_detect

A CakePHP plugin component for identifying mobile devices using the Mobile\_Detect project.

24246.5k1](/packages/chronon-mobile-detect)[lorenzo/linkable

CakePHP Linkable Behavior

2753.3k](/packages/lorenzo-linkable)[fotografde/cakephp-sms

SMS Plugin for CakePHP

1273.2k](/packages/fotografde-cakephp-sms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
