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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hiromi2424/transition

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

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

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

2.0(11y ago)4563.8k↓62.4%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 2d 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 86% 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

4249d ago

Major Versions

1.1 → 2.02014-11-14

### Community

Maintainers

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

![](https://avatars.githubusercontent.com/u/191297?v=4)[Hiroki Shimizu](/maintainers/hiromi2424)[@hiromi2424](https://github.com/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

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3376.6k](/packages/starcitizentools-citizen-skin)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

19251.4k3](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5721.7k4](/packages/pfefferle-wordpress-activitypub)

PHPackages © 2026

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