CodeExplorer getThemeTimestamp example
public function moveThemeFilesAction() { $repository =
$this->
get(ModelManager::
class)->
getRepository(Shop::
class);
$shops =
$repository->
getShopsWithThemes()->
getResult();
$compiler =
$this->container->
get('theme_compiler'
);
$pathResolver =
$this->container->
get(PathResolver::
class);
$time =
time();
foreach ($shops as $shop) { $oldTimestamp =
(int) $compiler->
getThemeTimestamp($shop);
if ($oldTimestamp ===
$time) { ++
$time;
} $new =
$pathResolver->
getCssFilePath($shop, 'new'
);
if (!
file_exists($new)) { continue;
} rename( $pathResolver->
getCssFilePath($shop, 'new'
),