-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
188 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
$arModuleVersion = [ | ||
'VERSION' => '1.1.0', | ||
'VERSION_DATE' => '2023-06-13 16:45:00' | ||
'VERSION' => '1.1.1', | ||
'VERSION_DATE' => '2024-06-14 15:00:00' | ||
]; |
This file contains 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
2 changes: 2 additions & 0 deletions
2
lang/ru/lib/locator/iblock/property/agepollresultproperty.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
$MESS['INTERVOLGA_EDU.AGE_POLL_RESULTS_PROPERTY'] = 'Заработная плата'; |
2 changes: 2 additions & 0 deletions
2
lang/ru/lib/locator/io/componenttemplate/respondenttemplate.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
$MESS['INTERVOLGA_EDU.LOCATOR_IO_RESPONDENT_TEMPLATE'] = 'Шаблон кастомного компонента "Респонденты/Результаты голосования"'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
<?php | ||
$MESS['INTERVOLGA_EDU.COURSE_1_LESSON_1_LICENSE_NAME'] = 'Стандарт'; | ||
$MESS['INTERVOLGA_EDU.COURSE_1_LESSON_1_LICENSE_NAME'] = 'Стандарт'; | ||
$MESS['INTERVOLGA_EDU.COURSE_1_LESSON_1_TEST_ERROR'] = 'Ошибка теста: #MESSAGE#'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
$MESS['INTERVOLGA_EDU.COURSE_1_LESSON_1_TEST_ERROR'] = 'Ошибка теста: #MESSAGE#'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
$MESS['INTERVOLGA_EDU.COURSE_1_LESSON_2_NOT_FOUND_PROMO_IN_MENU'] = 'Раздел <b>#PROMO_NAME#</b> (Акции) в главном меню не найден'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
namespace Intervolga\Edu\Locator\Component; | ||
|
||
class SearchForm extends ComponentLocator | ||
{ | ||
public static function getCode(): array | ||
{ | ||
return ['bitrix:search.form']; | ||
} | ||
|
||
public static function getFilter(): array | ||
{ | ||
return array_merge(parent::getFilter(), ['REAL_PATH' => '/local/templates/.default/%header.php']); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ public static function getFilter(): array | |
'promos', | ||
'stock', | ||
'stocks', | ||
'promotion', | ||
], | ||
]; | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Intervolga\Edu\Locator\Iblock\Property; | ||
|
||
use Bitrix\Main\Localization\Loc; | ||
use Intervolga\Edu\Locator\Iblock\ResultsPollingIblock; | ||
|
||
class AgePollResultProperty extends PropertyLocator | ||
{ | ||
public static function getIblock() | ||
{ | ||
return ResultsPollingIblock::class; | ||
} | ||
|
||
public static function getFilter(): array | ||
{ | ||
return [ | ||
'=CODE' => [ | ||
'AGE', | ||
], | ||
'PROPERTY_TYPE' => [ | ||
'N' | ||
] | ||
]; | ||
} | ||
|
||
public static function getNameLoc(): string | ||
{ | ||
return Loc::getMessage('INTERVOLGA_EDU.AGE_POLL_RESULTS_PROPERTY'); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Intervolga\Edu\Locator\IO\ComponentTemplate; | ||
|
||
use Bitrix\Main\Localization\Loc; | ||
use Intervolga\Edu\Locator\IO\DirectoryLocator; | ||
use Intervolga\Edu\Locator\IO\CustomRespondents; | ||
|
||
class RespondentTemplate extends DirectoryLocator | ||
{ | ||
public static function getNameLoc(): string | ||
{ | ||
return Loc::getMessage('INTERVOLGA_EDU.LOCATOR_IO_RESPONDENT_TEMPLATE'); | ||
} | ||
|
||
protected static function getRootLocator() | ||
{ | ||
return CustomRespondents::class; | ||
} | ||
|
||
protected static function getPaths(): array | ||
{ | ||
$paths = ['/templates/.default/']; | ||
|
||
return $paths; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
<?php | ||
namespace Intervolga\Edu\Tests\Course1\Lesson2; | ||
|
||
use Bitrix\Main\Localization\Loc; | ||
use Intervolga\Edu\Asserts\Assert; | ||
use Intervolga\Edu\Locator\IO\PromoSection; | ||
use Intervolga\Edu\Tests\BaseTest; | ||
use Intervolga\Edu\Util\Menu; | ||
|
||
class TestPromo extends BaseTest | ||
{ | ||
protected static function run() | ||
{ | ||
Assert::directoryLocator(PromoSection::class); | ||
} | ||
protected static function run() | ||
{ | ||
Assert::directoryLocator(PromoSection::class); | ||
|
||
$links = Menu::getMenuLinks('/.top.menu.php', true); | ||
Assert::notEmpty( | ||
$links[PromoSection::find()->getName()], | ||
Loc::getMessage('INTERVOLGA_EDU.COURSE_1_LESSON_2_NOT_FOUND_PROMO_IN_MENU', | ||
['#PROMO_NAME#' => PromoSection::find()->getName(),]) | ||
); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
namespace Intervolga\Edu\Tests\Course3\Lesson3; | ||
|
||
use Intervolga\Edu\Asserts\Assert; | ||
use Intervolga\Edu\Locator\IO\ComponentTemplate\RespondentTemplate; | ||
use Intervolga\Edu\Locator\IO\CustomRespondents; | ||
use Intervolga\Edu\Locator\IO\DirectoryLocator; | ||
use Intervolga\Edu\Tests\BaseTest; | ||
use Intervolga\Edu\Util\Regex; | ||
|
||
class TestPropertyCode extends BaseTest | ||
{ | ||
public static function interceptErrors() | ||
{ | ||
return true; | ||
} | ||
|
||
protected static function run() | ||
{ | ||
static::checkComponentFile(CustomRespondents::class); | ||
static::checkTemplate(RespondentTemplate::class); | ||
} | ||
|
||
/** | ||
* @param DirectoryLocator|string $dirComponent | ||
*/ | ||
protected static function checkComponentFile($dirComponent) | ||
{ | ||
Assert::directoryLocator($dirComponent); | ||
$file = $dirComponent::getComponentFile(); | ||
Assert::fileContentNotMatches($file, | ||
new Regex('/(\'|")(SALARY|GENDER|AGE)(\'|")/i', '\'SALARY\', \'GENDER\', \'AGE\'')); | ||
} | ||
|
||
/** | ||
* @param DirectoryLocator|string $dirTemplate | ||
*/ | ||
protected static function checkTemplate($dirTemplate) | ||
{ | ||
Assert::directoryLocator($dirTemplate); | ||
$directory = $dirTemplate::find(); | ||
|
||
foreach ($directory->getChildren() as $child) { | ||
if ($child->isFile()) { | ||
Assert::fileContentNotMatches($child, | ||
new Regex('/(\'|")(SALARY|GENDER|AGE)(\'|")/i', '\'SALARY\', \'GENDER\', \'AGE\'')); | ||
} | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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