PHP code example of wikimedia / codex
1. Go to this page and download the library: Download wikimedia/codex 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/ */
wikimedia / codex example snippets
kimedia\Codex\Utility\Codex;
$codex = new Codex();
$accordion = $codex
->accordion()
->setTitle( "Accordion Example" )
->setDescription( "This is an example of an accordion." )
->setContentHtml(
$codex
->htmlSnippet()
->setContent( "<p>This is the content.</p>" )
->build()
)
->setOpen( false )
->setAttributes( [
"class" => "foo",
"bar" => "baz",
] )
->build()
->getHtml();
echo $accordion;