PHP code example of creative-workflow / php

1. Go to this page and download the library: Download creative-workflow/php 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/ */

    

creative-workflow / php example snippets


bower install --save creative-workflow.php

or

composer low/lib-php.git ./wordpress/wp-content/themes/child/lib/cw/php

<?

$jQuery = \cw\php\js\jQuery::getInstance();

$jQuery->when(
  $jQuery->getScript('...'),
  $jQuery->getScript('...'),
  $jQuery->getScript('...')  
)
->then(
  $jQuery->anonymousFunction([],
    $jQuery->select('a.fancybox')
           ->chain('fancybox()')
           ->chain('animate({opacity: 1})')
           ->stop()
  )
)
->stop();

//output generated js code
echo $jQuery->toJsWrapped();

use \cw\php\view\Html;

$html = Html::getInstance()

echo $html->tag('div', ['class' => 'logo-wrapper'])
          ->append(
            $html->image('...', ['class' => 'logo'])
      );


echo $html->script(
        $jQuery->select('a.fancybox')
               ->chain('fancybox()')
               ->chain('animate({opacity: 1})')
               ->stop()
      );

...