2017 © Pedro Peláez
 

zf-module aliashelper

image

zf2helper/aliashelper

  • Monday, January 26, 2015
  • by antonigonin
  • Repository
  • 2 Watchers
  • 0 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

AliasHelper

Simple module that creates alias from any text field of the entity., (*1)

How does it work:, (*2)

  1. Gets from entity field to create alias (title by default).
  2. Convert field to url friendly alias.
  3. Searchs entity repository for this alias.
  4. Adds "-number" if such alias exists.

Usage:, (*3)

#!php

$entity = new Entity();
$aliasModel = $this->getServiceLocator()->get('AliasHelper');
//$field - entity field that must be converted to alias, title by default
$alias = $aliasModel->getAlias($entity, $field)

$entity->setAlias($alias);

The Versions