HandleBrowsers
trait HandleBrowsers (View source)
Properties
| protected array | $browsers | All browsers used in the model, as an array of browser names: [ 'books', 'publications' ]. | 
Methods
No description
No description
No description
Get all browser' detail info from the $browsers attribute.
Guess the browser's relation name (shoud be lower camel case, ex. userGroup, contactOffice).
Guess the module's model name (should be singular upper camel case, ex. User, ArticleType).
Guess the browser's module name (should be plural lower camel case, ex. userGroups, contactOffices).
Details
        
                            void
    afterSaveHandleBrowsers(Model $object, array $fields)
        
    
    No description
        
                            array
    getFormFieldsHandleBrowsers(Model $object, array $fields)
        
    
    No description
        
                            void
    updateBrowser(TwillModelContract $object, array $fields, string $relationship, string $positionAttribute = 'position', string|null $browserName = null, array $pivotAttributes = [])
        
    
    No description
        
                            void
    updateOrderedBelongsTomany(Model $object, array $fields, string $relationship, string $positionAttribute = 'position')
        
    
    No description
        
                            void
    updateRelatedBrowser(Model $object, array $fields, string $browserName)
        
    
    No description
        
                            array
    getFormFieldsForBrowser(TwillModelContract $object, string $relation, string|null $routePrefix = null, string $titleKey = 'title', string|null $moduleName = null)
        
    
    No description
        
                            array
    getFormFieldsForRelatedBrowser(Model $object, string $relation, $titleKey = 'title')
        
    
    No description
        
                    protected        Collection
    getBrowsers()
        
    
    Get all browser' detail info from the $browsers attribute.
The missing information will be inferred by convention of Twill.
        
                    protected        string
    inferRelationFromBrowserName(string $browserName)
        
    
    Guess the browser's relation name (shoud be lower camel case, ex. userGroup, contactOffice).
        
                    protected        string
    inferModelFromModuleName(string $moduleName)
        
    
    Guess the module's model name (should be singular upper camel case, ex. User, ArticleType).
        
                    protected        string
    inferModuleNameFromBrowserName(string $browserName)
        
    
    Guess the browser's module name (should be plural lower camel case, ex. userGroups, contactOffices).