23 lines
394 B
PHP
23 lines
394 B
PHP
<?php
|
|
|
|
namespace KupShop\CatalogBundle\Util;
|
|
|
|
class CampaignsUtil
|
|
{
|
|
public function getCampaigns()
|
|
{
|
|
return getCampaigns();
|
|
}
|
|
|
|
public function getCampaignByUrl($url)
|
|
{
|
|
foreach ($this->getCampaigns() as $key => $campaign) {
|
|
if (getVal('url', $campaign) == $url) {
|
|
return $key;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|