Skip over navigation
Documentation

@Config

Warning

This documentation refers to a previously released version of OroCRM. See the latest development version (current) or the latest LTS version (2.6).

This annotation is used to configure default values for configurable entity classes.

Options

defaultValues

Configures default values for particular config options on a per property basis:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
// ...
use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;

/**
 * @Config(
 *      defaultValues={
 *          "dataaudit"={
 *              "auditable"=true
 *          }
 *      }
 * )
 */
class User
{
    // ...
}

This example sets the auditable option from the dataaudit scope to true for the User class.

routeName

The route name of view that shows the datagrid of available records:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// ...
use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;

/**
 * @Config(
 *      routeName="oro_user_index"
 * )
 */
class User
{
    // ...
}

routeView

The route name of a controller that shows a particular object:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// ...
use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;

/**
 * @Config(
 *      routeView="oro_user_view"
 * )
 */
class User
{
    // ...
}

routeCreate

The route name of a controller that creates an object:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    // ...
    use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;

    /**
     * @Config(
     *      routeCreate="oro_user_create"
     * )
     */
    class User
    {
        // ...
    }

routeUpdate

The route name of controller action that updates an object:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
        // ...
        use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;

        /**
         * @Config(
         *      routeUpdate="oro_user_update"
         * )
         */
        class User
        {
            // ...
        }
Browse maintained versions:3.01.122.02.32.6

You will be redirected to [title]. Would you like to continue?

Yes No
sso for www.magecore.comsso for oroinc.desso for oroinc.frsso for marketplace.orocommerce.comsso for marketplace.orocrm.com
Back to top