PHP code example of johndoh / swipe

1. Go to this page and download the library: Download johndoh/swipe library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

johndoh / swipe example snippets


$config['swipe_actions'] = [
  'messagelist' => [
    'left' => '<action>',
    'right' => '<action>',
    'down' => '<action>'
  ],
  'contactlist' => [
    'left' => '<action>',
    'right' => '<action>',
    'down' => 'none'
  ]
];

$args['actions'] = [
  'list_name' => '*JS list object name*',
  'selection_id' => '*JS element identifier e.g. UID*',
  'vertical' => [
    '*action_name*' => ['label' => '*display name*'],
    ...
  ],
  'horizontal' => [
    '*action_name*' => ['label' => '*display name*'],
    ...
  ]
];