<commit_before><?php
/**
 * For the full copyright and license information, please view
 * the file license.txt that was distributed with this source code.
 *
 * @author <NAME> <<EMAIL>>
 * @since 2012.02.05
 * @license MIT
 * @copyright Copyright (c) 2011, 2012 <NAME> <<EMAIL>>
 */

namespace steky\nette\gallery\Control;
use \Nette\InvalidArgumentException,
	\steky\nette\gallery\AbstractControl,
	\steky\nette\gallery\Model\AbstractGroup,
	\steky\nette\gallery\Model\AbstractItem,
	\ImageHelper;

class GroupControl extends AbstractControl {

	/**
	 * @var string Action which shows item list
	 */
	protected $actionViewItems;

	/**
	 * @var string Action which allows to edit group
	 */
	protected $actionEditGroup = null;

	/**
	 * @var array Groupd data
	 */
	protected $group;

	/**
	 * @param \ImageHelper $imageHelper
	 * @param \steky\nette\gallery\Model\AbstractGroup $groupModel
	 * @param \steky\nette\gallery\Model\AbstractItem $itemModel
	 * @param string $actionViewItems Action to view all items in group
	 *  @param array $group Group data
	 */
	public function __construct(ImageHelper $imageHelper, AbstractGroup $groupModel, AbstractItem $itemModel, $actionViewItems, $group) {
		parent::__construct($imageHelper, $groupModel, $itemModel);
		$this->actionViewItems = $actionViewItems;
		$this->group = $group;

		$this->templateFile = __DIR__ . '/group.latte';
	}

	/**
	 * @param bool $admin
	 * @param string $actionEditGroup Action to edit group
	 * @return \steky\nette\gallery\Control\GroupControl
	 */
	public function setAdmin($admin, $actionEditGroup = null) {
		if ($actionEditGroup === null) {
			throw new InvalidArgumentException('GroupControl can not be set as Admin without correct edit action.');
		}<commit_msg>* typo<commit_after><?php
/**
 * For the full copyright and license information, please view
 * the file license.txt that was distributed with this source code.
 *
 * @author <NAME> <<EMAIL>>
 * @since 2012.02.05
 * @license MIT
 * @copyright Copyright (c) 2011, 2012 <NAME> <<EMAIL>>
 */

namespace steky\nette\gallery\Control;
use \Nette\InvalidArgumentException,
	\steky\nette\gallery\AbstractControl,
	\steky\nette\gallery\Model\AbstractGroup,
	\steky\nette\gallery\Model\AbstractItem,
	\ImageHelper;

class GroupControl extends AbstractControl {

	/**
	 * @var string Action which shows item list
	 */
	protected $actionViewItems;

	/**
	 * @var string Action which allows to edit group
	 */
	protected $actionEditGroup = null;

	/**
	 * @var array Group data
	 */
	protected $group;

	/**
	 * @param \ImageHelper $imageHelper
	 * @param \steky\nette\gallery\Model\AbstractGroup $groupModel
	 * @param \steky\nette\gallery\Model\AbstractItem $itemModel
	 * @param string $actionViewItems Action to view all items in group
	 *  @param array $group Group data
	 */
	public function __construct(ImageHelper $imageHelper, AbstractGroup $groupModel, AbstractItem $itemModel, $actionViewItems, $group) {
		parent::__construct($imageHelper, $groupModel, $itemModel);
		$this->actionViewItems = $actionViewItems;
		$this->group = $group;

		$this->templateFile = __DIR__ . '/group.latte';
	}

	/**
	 * @param bool $admin
	 * @param string $actionEditGroup Action to edit group
	 * @return \steky\nette\gallery\Control\GroupControl
	 */
	public function setAdmin($admin, $actionEditGroup = null) {
		if ($actionEditGroup === null) {
			throw new InvalidArgumentException('GroupControl can not be set as Admin without correct edit action.');
		}
{'fraction_non_alphanumeric': 0.12127293577981652, 'fraction_numerical': 0.009174311926605505, 'mean_word_length': 4.286363636363636, 'pattern_counts': {'":': 0, '<': 17, '<?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': '6852735', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1032, 'n_words': 299}