<commit_before><?php
/**
 * catalog_BlockShelfContextualListAction
 * @package modules.catalog
 */
class catalog_BlockShelfContextualListAction extends website_BlockAction
{
	/**
	 * @see website_BlockAction::execute()
	 *
	 * @param f_mvc_Request $request
	 * @param f_mvc_Response $response
	 * @return String
	 */
	function execute($request, $response)
	{
		$subShelves = $this->getSubShelves();
		$request->setAttribute('currentShelf', $this->getCurrentEcommerceContainer());
		$request->setAttribute('shelves', $this->getSubShelves());
		$request->setAttribute('redirectFormAction', LinkHelper::getActionUrl('catalog', 'Redirect'));
		if ($this->isInBackoffice() && count($subShelves) < 1)
		{
			return block_BlockView::NONE;
		}
		else
		{
			return block_BlockView::SUCCESS;
		}
	}
	
	/**
	 * @return array<String, String>
	 */
	function getMetas()
	{
		$container = $this->getCurrentEcommerceContainer();
		if ($container instanceof catalog_persistentdocument_shelf)
		{<commit_msg>[FIX]Remplace old class by new class<commit_after><?php
/**
 * catalog_BlockShelfContextualListAction
 * @package modules.catalog
 */
class catalog_BlockShelfContextualListAction extends website_BlockAction
{
	/**
	 * @see website_BlockAction::execute()
	 *
	 * @param f_mvc_Request $request
	 * @param f_mvc_Response $response
	 * @return String
	 */
	function execute($request, $response)
	{
		$subShelves = $this->getSubShelves();
		$request->setAttribute('currentShelf', $this->getCurrentEcommerceContainer());
		$request->setAttribute('shelves', $this->getSubShelves());
		$request->setAttribute('redirectFormAction', LinkHelper::getActionUrl('catalog', 'Redirect'));
		if ($this->isInBackoffice() && count($subShelves) < 1)
		{
			return website_BlockView::NONE;
		}
		else
		{
			return website_BlockView::SUCCESS;
		}
	}
	
	/**
	 * @return array<String, String>
	 */
	function getMetas()
	{
		$container = $this->getCurrentEcommerceContainer();
		if ($container instanceof catalog_persistentdocument_shelf)
		{
{'fraction_non_alphanumeric': 0.1443504230960677, 'fraction_numerical': 0.0009955201592832255, 'mean_word_length': 5.525974025974026, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2269234', 'n_tokens_mistral': 685, 'n_tokens_neox': 628, 'n_words': 105}