Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

User Role Type Bundle Laravel Package

coosos/user-role-type-bundle

View on GitHub
Deep Wiki
Context7

Coosos/UserRoleTypeBundle

SensioLabsInsight Build Status

Requirements

Package Version
PHP ^7.1
Symfony ^3.4, ^4.0, ~5.0

Installation

Step 1 : Download the bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle :

composer require "coosos/user-role-type-bundle" "^2.0"

This command is used if composer is installed in your system.

Step 2: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project :

// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Coosos\UserRoleTypeBundle\CoososUserRoleTypeBundle(),
        );
        // ...
    }
    // ...
}

Usage

Form type

use Coosos\UserRoleTypeBundle\Form\Type;
...
$builder->add("roles", UserRoleType::class, ["coosos_security_checked" => "strict"]);

Form twig

example

{{ form_start(userForm) }}
{{ form_row(userForm.roles.ROLE_ADMIN) }}
{{ form_end(userForm) }}

Option

  • coosos_security_checked (default="strict")
    • strict = Prevents from being able to attribute a higher grade than his own
  • coosos_input_type (default="Symfony\Component\Form\Extension\Core\Type\CheckboxType")
    • Allows you to select another type of input (interesting for customize)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver