This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php list($name, $pages) = $yellow->getSnippetArgs() ?> | |
<?php if($pages->isPagination()): ?> | |
<div class="pagination"> | |
<?php if($pages->getPaginationPrevious()): ?> | |
<a class="previous" href="<?php echo $pages->getPaginationPrevious() ?>"><?php echo $yellow->text->getHtml("paginationPrevious") ?></a> | |
<?php endif ?> | |
<?php if($pages->getPaginationCount() > 1): ?> | |
<?php for($i = 1; $i <= $pages->getPaginationCount(); ++$i): ?> | |
<a class="pagination-number<?php if ($i == $pages->getPaginationNumber()) echo " active" ?>" href="<?php echo $pages->getPaginationLocation(true, $i) ?>"><?php echo $i ?></a> | |
<?php endfor ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$imageObject = new Pimcore\Model\Object\Data\ExternalImage; | |
$imageObject->setUrl('http://www.url.com/to/your/image.jpg'); | |
$pimcoreObject->setExternalImage($imageObject); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function rgbToHsl($r, $g, $b) | |
{ | |
$r /= 255; | |
$g /= 255; | |
$b /= 255; | |
$max = max($r, $g, $b); | |
$min = min($r, $g, $b); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param string $absolutePathToCsvFile | |
* @param string $csvFilename | |
* @return array $data | |
* @throws Exception $e | |
*/ | |
private static function readCsvFile($absolutePathToCsvFile, $csvFilename) | |
{ | |
try { | |
$data = array_map('str_getcsv', file($absolutePathToCsvFile . '/' . $csvFilename)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isMobileDevice { | |
return (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Filter table</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style type="text/css"> | |
tr { | |
display: none; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* return bool | |
*/ | |
function checkIfLocalStorageIsSupported() { | |
try { | |
return 'localStorage' in window && window['localStorage'] !== null; | |
} catch (e) { | |
return false; | |
} | |
} |