classes/Fields/ManyToManyChecklist.php
protected function createCheckable($item, $fallbackValue = 1)
    {
        // Get the model reference out of the item and remove it before it's
        // rendered.  Otherwise it gets created as a data atrribute
        $model = $item['attributes']['model'];
        unset($item['attributes']['model']);

        // Render the checkbox as per normal
        $html = parent::createCheckable($item, $fallbackValue);

        // Mutate a checkable using user defined
        if ($this->decorator) {
            $html = call_user_func($this->decorator, $html, $model);
        }

        // Return html
        return $html;
    }
protected function createCheckable($item, $fallbackValue = 1)
    {
        // Get the model reference out of the item and remove it before it's
        // rendered.  Otherwise it gets created as a data atrribute
        $model = $item['attributes']['model'];
        unset($item['attributes']['model']);

        // Render the checkbox as per normal
        $html = parent::createCheckable($item, $fallbackValue);

        // Mutate a checkable using user defined
        if ($this->decorator) {
            $html = call_user_func($this->decorator, $html, $model);
        }

        // Return html
        return $html;
    }
protected function createCheckable ( $ item , $ fallbackValue = 1 ) { // Get the model reference out of the item and remove it before it's // rendered.  Otherwise it gets created as a data atrribute $ model = $ item [ 'attributes' ] [ 'model' ] ; unset ( $ item [ 'attributes' ] [ 'model' ] ) ; // Render the checkbox as per normal $ html = parent :: createCheckable ( $ item , $ fallbackValue ) ; // Mutate a checkable using user defined if ( $ this -> decorator ) { $ html = call_user_func ( $ this -> decorator , $ html , $ model ) ; } // Return html return $ html ; }
Renders a checkable. This overrides the Former subclass so we can decorate
each individual `.checkbox`div.

@param string|array $item          A checkable item
@param integer      $fallbackValue A fallback value if none is set

@return string
Renders a checkable . This overrides the Former subclass so we can decorate each individual . checkbox div .