Overview

Namespaces

  • ApiBundle
    • DataFixtures
      • Faker
        • Provider
    • DependencyInjection
    • Doctrine
      • DBAL
        • Type
      • ORM
        • Filter
          • User
    • Entity
    • EventListener
      • Doctrine
    • Manager
    • Utils
  • FrontBundle
    • Bundle
      • UserBundle
    • Client
      • Exception
    • Controller
    • DependencyInjection
    • Form
      • DataTransformer
      • Type
    • Menu
    • Security
      • Http
        • Authentication
    • Services
      • Http
    • Twig
    • Utils

Classes

  • DateTimeProvider
  • JobProvider
  • MandateProvider
  • StudentConventionProvider
  • UserProvider
  • Overview
  • Namespace
  • Class

Class UserProvider

Faker provider for users.

Namespace: ApiBundle\DataFixtures\Faker\Provider
Author: Théo FIDRY theo.fidry@gmail.com
See: ApiBundle\Entity\User
Located at ApiBundle/DataFixtures/Faker/Provider/UserProvider.php
Methods summary
public
# __construct( ApiBundle\Utils\UserRoles $userRoles )

Parameters

$userRoles
public string
# userRole( )

The first call generate unique values. This is to ensure all values are called before generating duplicates.

The first call generate unique values. This is to ensure all values are called before generating duplicates.

Returns

string

Random Symfony role.

TODO: take into account users hierarchy too!

public array
# userTypes( string|null $type = null )

Parameters

$type

If specified, return the type value. See User::getAllowedTypes() to see valid type names; if is invalid will return en empty array. Otherwise return an array with a random of types.

Returns

array
Array of user types.
API documentation generated by ApiGen