Can Delete Row list plugin

Dec 1, 2017
Can Delete Row list plugin
  • This plug-in provides a fine grained control over which records can be deleted from a list and from a form view.

    The list's Access->delete records option takes precedence over this plugin. That is to say that if you are logged in as a registered user, and the list's delete records option is set to Special, then no records can be deleted, regardless of any match that might be made with this plugin.

    NOTE the above precedence was change on 12/1/2017. The plugin now takes precedence over the list's normal group/user ACLs. If the plugin returns true or false, this overrides the list's ACLs. If the plugin returns null, then the list ACL's are used. If more than one plugin returns a result, 'false' takes precedence.

    candeleterow-options.png
    • Access - Which Joomla user access level will the plug-in be applied to
    • Element - The element whose value we well be using to determine if the row can be deleted
    • Use Raw - Should we use the raw value stored in the database, or the label.
    • Operator - Should we show the delete button, when the 'Element's value equals or does not equal the value defined in 'Value'
    • Value - defines the value to compare against
    With the example settings above our list will appear as in the image below. As record id 1 has skill equal to 'card-sharp', its delete button is shown.

    candeleterow-listview.png


    candeleterow-advanced.png
    • PHP (eval) - overrides the standard element, use raw, operator, and value options, and instead evaluates a PHP statment.
    We could achieve the same result as previously set up by entering this code in the PHP textarea.
    PHP:

    return '{list_plugin_candeleterow___skill_raw}' === 'card-sharp';
     
    As you can see from the example above, the PHP (eval) textarea accepts the use of placeholders
  • Loading...