id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
31,400 | chameleon-system/chameleon-shop | src/ExtranetRegistrationGuestBundle/pkgExtranet/objects/WebModules/MTExtranetRegistrationGuestCore/MTExtranetRegistrationGuestCore.class.php | MTExtranetRegistrationGuestCore.ActivePageIsRegisterAfterShopping | protected function ActivePageIsRegisterAfterShopping()
{
$bActivePageIsRegisterAfterShopping = false;
$oURLData = TCMSSmartURLData::GetActive();
$oShop = TdbShop::GetInstance($oURLData->iPortalId);
$sNodeId = $oShop->GetSystemPageNodeId('register-after-shopping');
$oActivePag... | php | protected function ActivePageIsRegisterAfterShopping()
{
$bActivePageIsRegisterAfterShopping = false;
$oURLData = TCMSSmartURLData::GetActive();
$oShop = TdbShop::GetInstance($oURLData->iPortalId);
$sNodeId = $oShop->GetSystemPageNodeId('register-after-shopping');
$oActivePag... | [
"protected",
"function",
"ActivePageIsRegisterAfterShopping",
"(",
")",
"{",
"$",
"bActivePageIsRegisterAfterShopping",
"=",
"false",
";",
"$",
"oURLData",
"=",
"TCMSSmartURLData",
"::",
"GetActive",
"(",
")",
";",
"$",
"oShop",
"=",
"TdbShop",
"::",
"GetInstance",
... | Checks if active page is register guest page.
@return bool | [
"Checks",
"if",
"active",
"page",
"is",
"register",
"guest",
"page",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ExtranetRegistrationGuestBundle/pkgExtranet/objects/WebModules/MTExtranetRegistrationGuestCore/MTExtranetRegistrationGuestCore.class.php#L166-L178 |
31,401 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExample.php | RefundExample.getOrderReferenceDetails | public function getOrderReferenceDetails()
{
$getOrderReferenceDetailsRequest
= new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest();
$getOrderReferenceDetailsRequest->setSellerId($this->_sellerId);
$getOrderReferenceDetailsRequest->setAmazonOrderReferenceId(
... | php | public function getOrderReferenceDetails()
{
$getOrderReferenceDetailsRequest
= new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest();
$getOrderReferenceDetailsRequest->setSellerId($this->_sellerId);
$getOrderReferenceDetailsRequest->setAmazonOrderReferenceId(
... | [
"public",
"function",
"getOrderReferenceDetails",
"(",
")",
"{",
"$",
"getOrderReferenceDetailsRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest",
"(",
")",
";",
"$",
"getOrderReferenceDetailsRequest",
"->",
"setSellerId",
"(",
"$",
"this",... | Get the order reference details to find to the state
of the order reference
@return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse response | [
"Get",
"the",
"order",
"reference",
"details",
"to",
"find",
"to",
"the",
"state",
"of",
"the",
"order",
"reference"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExample.php#L80-L92 |
31,402 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExample.php | RefundExample.getCaptureDetailsRequest | public function getCaptureDetailsRequest()
{
$getCaptureDetailsRequest
= new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest();
$getCaptureDetailsRequest->setSellerId($this->_sellerId);
$getCaptureDetailsRequest->setAmazonCaptureId($this->_amazonCaptureId);
... | php | public function getCaptureDetailsRequest()
{
$getCaptureDetailsRequest
= new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest();
$getCaptureDetailsRequest->setSellerId($this->_sellerId);
$getCaptureDetailsRequest->setAmazonCaptureId($this->_amazonCaptureId);
... | [
"public",
"function",
"getCaptureDetailsRequest",
"(",
")",
"{",
"$",
"getCaptureDetailsRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_GetCaptureDetailsRequest",
"(",
")",
";",
"$",
"getCaptureDetailsRequest",
"->",
"setSellerId",
"(",
"$",
"this",
"->",
"_sellerId... | Get the capture details to find out the
maximum amount that can be refunded
@return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse response | [
"Get",
"the",
"capture",
"details",
"to",
"find",
"out",
"the",
"maximum",
"amount",
"that",
"can",
"be",
"refunded"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExample.php#L100-L108 |
31,403 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExample.php | RefundExample.getRefundDetails | public function getRefundDetails($amazonRefundId)
{
$getRefundDetailsRequest
= new OffAmazonPaymentsService_Model_GetRefundDetailsRequest();
$getRefundDetailsRequest->setSellerId($this->_sellerId);
$getRefundDetailsRequest->setAmazonRefundId($amazonRefundId);
return $thi... | php | public function getRefundDetails($amazonRefundId)
{
$getRefundDetailsRequest
= new OffAmazonPaymentsService_Model_GetRefundDetailsRequest();
$getRefundDetailsRequest->setSellerId($this->_sellerId);
$getRefundDetailsRequest->setAmazonRefundId($amazonRefundId);
return $thi... | [
"public",
"function",
"getRefundDetails",
"(",
"$",
"amazonRefundId",
")",
"{",
"$",
"getRefundDetailsRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_GetRefundDetailsRequest",
"(",
")",
";",
"$",
"getRefundDetailsRequest",
"->",
"setSellerId",
"(",
"$",
"this",
"-... | Perform the getRefundDetails request for the order
@param string $amazonRefundId authorization transaction
to query
@return OffAmazonPaymentsService_Model_GetRefundDetailsResponse response | [
"Perform",
"the",
"getRefundDetails",
"request",
"for",
"the",
"order"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExample.php#L180-L187 |
31,404 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopOrderEndPoint.class.php | TCMSTableEditorShopOrderEndPoint.ShopOrderSendConfirmOrderMail | public function ShopOrderSendConfirmOrderMail($sMail = null)
{
$oGlobal = TGlobal::instance();
if (is_null($sMail)) {
$sMail = $oGlobal->GetUserData('sTargetMail');
}
$oReturnData = $this->GetObjectShortInfo();
$oReturnData->sTargetMail = $sMail;
$bSucces... | php | public function ShopOrderSendConfirmOrderMail($sMail = null)
{
$oGlobal = TGlobal::instance();
if (is_null($sMail)) {
$sMail = $oGlobal->GetUserData('sTargetMail');
}
$oReturnData = $this->GetObjectShortInfo();
$oReturnData->sTargetMail = $sMail;
$bSucces... | [
"public",
"function",
"ShopOrderSendConfirmOrderMail",
"(",
"$",
"sMail",
"=",
"null",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"sMail",
")",
")",
"{",
"$",
"sMail",
"=",
"$",
"oGlobal",... | send the current order to the email.
@param string $sMail - can also be passed via get/post | [
"send",
"the",
"current",
"order",
"to",
"the",
"email",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopOrderEndPoint.class.php#L50-L78 |
31,405 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopOrderEndPoint.class.php | TCMSTableEditorShopOrderEndPoint.GetFrontendActionUrlToSendOrderEmail | public function GetFrontendActionUrlToSendOrderEmail($sMail = null)
{
$sURL = '';
if (is_null($sMail)) {
$oGlobal = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.global');
$sMail = $oGlobal->GetUserData('sTargetMail');
}
if (!empty($sM... | php | public function GetFrontendActionUrlToSendOrderEmail($sMail = null)
{
$sURL = '';
if (is_null($sMail)) {
$oGlobal = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.global');
$sMail = $oGlobal->GetUserData('sTargetMail');
}
if (!empty($sM... | [
"public",
"function",
"GetFrontendActionUrlToSendOrderEmail",
"(",
"$",
"sMail",
"=",
"null",
")",
"{",
"$",
"sURL",
"=",
"''",
";",
"if",
"(",
"is_null",
"(",
"$",
"sMail",
")",
")",
"{",
"$",
"oGlobal",
"=",
"\\",
"ChameleonSystem",
"\\",
"CoreBundle",
... | send order notification for current order from backend - uses frontend action,
so portal and snippets are set correctly.
@param string $sMail - can also be passed via get/post
@return string | [
"send",
"order",
"notification",
"for",
"current",
"order",
"from",
"backend",
"-",
"uses",
"frontend",
"action",
"so",
"portal",
"and",
"snippets",
"are",
"set",
"correctly",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopOrderEndPoint.class.php#L88-L106 |
31,406 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopOrderEndPoint.class.php | TCMSTableEditorShopOrderEndPoint.DeleteExecute | protected function DeleteExecute()
{
$oOrder = clone $this->oTable;
$bReturn = parent::DeleteExecute();
if (!empty($oOrder->sqlData['data_extranet_user_id'])) {
$oTmpuser = TdbDataExtranetUser::GetNewInstance();
$oTmpuser->Load($oOrder->sqlData['data_extranet_user_id'... | php | protected function DeleteExecute()
{
$oOrder = clone $this->oTable;
$bReturn = parent::DeleteExecute();
if (!empty($oOrder->sqlData['data_extranet_user_id'])) {
$oTmpuser = TdbDataExtranetUser::GetNewInstance();
$oTmpuser->Load($oOrder->sqlData['data_extranet_user_id'... | [
"protected",
"function",
"DeleteExecute",
"(",
")",
"{",
"$",
"oOrder",
"=",
"clone",
"$",
"this",
"->",
"oTable",
";",
"$",
"bReturn",
"=",
"parent",
"::",
"DeleteExecute",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"oOrder",
"->",
"sqlData",
... | is called only from Delete method and calls all delete relevant methods
executes the final SQL Delete Query. | [
"is",
"called",
"only",
"from",
"Delete",
"method",
"and",
"calls",
"all",
"delete",
"relevant",
"methods",
"executes",
"the",
"final",
"SQL",
"Delete",
"Query",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopOrderEndPoint.class.php#L156-L169 |
31,407 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TPkgShop_CmsLanguage.class.php | TPkgShop_CmsLanguage.GetTranslatedPageURL | public function GetTranslatedPageURL()
{
$sTranslatesPageURL = '';
$this->TargetLanguageSimulation(true);
// product page
$oActiveProduct = TdbShop::GetActiveItem();
if (is_object($oActiveProduct)) {
$oNewProduct = TdbShopArticle::GetNewInstance($oActiveProduct->... | php | public function GetTranslatedPageURL()
{
$sTranslatesPageURL = '';
$this->TargetLanguageSimulation(true);
// product page
$oActiveProduct = TdbShop::GetActiveItem();
if (is_object($oActiveProduct)) {
$oNewProduct = TdbShopArticle::GetNewInstance($oActiveProduct->... | [
"public",
"function",
"GetTranslatedPageURL",
"(",
")",
"{",
"$",
"sTranslatesPageURL",
"=",
"''",
";",
"$",
"this",
"->",
"TargetLanguageSimulation",
"(",
"true",
")",
";",
"// product page",
"$",
"oActiveProduct",
"=",
"TdbShop",
"::",
"GetActiveItem",
"(",
")... | Return translated page URL.
@return string | [
"Return",
"translated",
"page",
"URL",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TPkgShop_CmsLanguage.class.php#L21-L65 |
31,408 | edmondscommerce/doctrine-static-meta | src/Container.php | Container.addConfiguration | final public function addConfiguration(ContainerBuilder $containerBuilder, array $server): void
{
$this->autoWireServices($containerBuilder);
$this->defineConfig($containerBuilder, $server);
$this->defineCache($containerBuilder, $server);
$this->defineEntityManager($containerBuilder)... | php | final public function addConfiguration(ContainerBuilder $containerBuilder, array $server): void
{
$this->autoWireServices($containerBuilder);
$this->defineConfig($containerBuilder, $server);
$this->defineCache($containerBuilder, $server);
$this->defineEntityManager($containerBuilder)... | [
"final",
"public",
"function",
"addConfiguration",
"(",
"ContainerBuilder",
"$",
"containerBuilder",
",",
"array",
"$",
"server",
")",
":",
"void",
"{",
"$",
"this",
"->",
"autoWireServices",
"(",
"$",
"containerBuilder",
")",
";",
"$",
"this",
"->",
"defineCo... | Build all the definitions, alias and other configuration for this container. Each of these steps need to be
carried out to allow the everything to work, however you may wish to change individual bits. Therefore this
method has been made final, but the individual methods can be overwritten if you extend off the class
@... | [
"Build",
"all",
"the",
"definitions",
"alias",
"and",
"other",
"configuration",
"for",
"this",
"container",
".",
"Each",
"of",
"these",
"steps",
"need",
"to",
"be",
"carried",
"out",
"to",
"allow",
"the",
"everything",
"to",
"work",
"however",
"you",
"may",
... | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Container.php#L348-L357 |
31,409 | edmondscommerce/doctrine-static-meta | src/Container.php | Container.autoWireServices | public function autoWireServices(ContainerBuilder $containerBuilder): void
{
$services = $this->getServices();
foreach ($services as $class) {
$containerBuilder->autowire($class, $class)->setPublic(true);
}
} | php | public function autoWireServices(ContainerBuilder $containerBuilder): void
{
$services = $this->getServices();
foreach ($services as $class) {
$containerBuilder->autowire($class, $class)->setPublic(true);
}
} | [
"public",
"function",
"autoWireServices",
"(",
"ContainerBuilder",
"$",
"containerBuilder",
")",
":",
"void",
"{",
"$",
"services",
"=",
"$",
"this",
"->",
"getServices",
"(",
")",
";",
"foreach",
"(",
"$",
"services",
"as",
"$",
"class",
")",
"{",
"$",
... | This takes every class from the getServices method, auto wires them and marks them as public. You may wish to
override this if you want to mark certain classes as private
@param ContainerBuilder $containerBuilder | [
"This",
"takes",
"every",
"class",
"from",
"the",
"getServices",
"method",
"auto",
"wires",
"them",
"and",
"marks",
"them",
"as",
"public",
".",
"You",
"may",
"wish",
"to",
"override",
"this",
"if",
"you",
"want",
"to",
"mark",
"certain",
"classes",
"as",
... | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Container.php#L365-L371 |
31,410 | edmondscommerce/doctrine-static-meta | src/Container.php | Container.defineEntityManager | public function defineEntityManager(ContainerBuilder $container): void
{
$container->getDefinition(EntityManagerInterface::class)
->addArgument(new Reference(Config::class))
->setFactory(
[
new Reference(EntityManagerFactory... | php | public function defineEntityManager(ContainerBuilder $container): void
{
$container->getDefinition(EntityManagerInterface::class)
->addArgument(new Reference(Config::class))
->setFactory(
[
new Reference(EntityManagerFactory... | [
"public",
"function",
"defineEntityManager",
"(",
"ContainerBuilder",
"$",
"container",
")",
":",
"void",
"{",
"$",
"container",
"->",
"getDefinition",
"(",
"EntityManagerInterface",
"::",
"class",
")",
"->",
"addArgument",
"(",
"new",
"Reference",
"(",
"Config",
... | This is used to auto wire the entity manager. It first adds the DSM factory as the factory for the class, and
sets the Entity Manager as the implementation of the interface. Overrider this if you want to use your own
factory to create and configure the entity manager
@param ContainerBuilder $container | [
"This",
"is",
"used",
"to",
"auto",
"wire",
"the",
"entity",
"manager",
".",
"It",
"first",
"adds",
"the",
"DSM",
"factory",
"as",
"the",
"factory",
"for",
"the",
"class",
"and",
"sets",
"the",
"Entity",
"Manager",
"as",
"the",
"implementation",
"of",
"t... | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Container.php#L460-L470 |
31,411 | edmondscommerce/doctrine-static-meta | src/Container.php | Container.configureValidationComponents | public function configureValidationComponents(ContainerBuilder $containerBuilder): void
{
$containerBuilder->getDefinition(EntityDataValidator::class)
->setFactory(
[
new Reference(EntityDataValidatorFactory::class),
... | php | public function configureValidationComponents(ContainerBuilder $containerBuilder): void
{
$containerBuilder->getDefinition(EntityDataValidator::class)
->setFactory(
[
new Reference(EntityDataValidatorFactory::class),
... | [
"public",
"function",
"configureValidationComponents",
"(",
"ContainerBuilder",
"$",
"containerBuilder",
")",
":",
"void",
"{",
"$",
"containerBuilder",
"->",
"getDefinition",
"(",
"EntityDataValidator",
"::",
"class",
")",
"->",
"setFactory",
"(",
"[",
"new",
"Refe... | Ensure we are using the container constraint validator factory so that custom validators with dependencies can
simply declare them as normal. Note that you will need to define each custom validator as a service in your
container.
@param ContainerBuilder $containerBuilder | [
"Ensure",
"we",
"are",
"using",
"the",
"container",
"constraint",
"validator",
"factory",
"so",
"that",
"custom",
"validators",
"with",
"dependencies",
"can",
"simply",
"declare",
"them",
"as",
"normal",
".",
"Note",
"that",
"you",
"will",
"need",
"to",
"defin... | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Container.php#L479-L488 |
31,412 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandler.class.php | TShopPaymentHandler.SetExecutePaymentInterrupt | public static function SetExecutePaymentInterrupt($bActive)
{
if ($bActive) {
$_SESSION[TdbShopPaymentHandler::CONTINUE_PAYMENT_EXECUTION_FLAG] = '1';
} else {
if (array_key_exists(TdbShopPaymentHandler::CONTINUE_PAYMENT_EXECUTION_FLAG, $_SESSION)) {
$_SESSION... | php | public static function SetExecutePaymentInterrupt($bActive)
{
if ($bActive) {
$_SESSION[TdbShopPaymentHandler::CONTINUE_PAYMENT_EXECUTION_FLAG] = '1';
} else {
if (array_key_exists(TdbShopPaymentHandler::CONTINUE_PAYMENT_EXECUTION_FLAG, $_SESSION)) {
$_SESSION... | [
"public",
"static",
"function",
"SetExecutePaymentInterrupt",
"(",
"$",
"bActive",
")",
"{",
"if",
"(",
"$",
"bActive",
")",
"{",
"$",
"_SESSION",
"[",
"TdbShopPaymentHandler",
"::",
"CONTINUE_PAYMENT_EXECUTION_FLAG",
"]",
"=",
"'1'",
";",
"}",
"else",
"{",
"i... | Set the ExecutePaymentInterrupt. If it is set to active, then the next request to the
basket page will auto.
@param bool $bActive | [
"Set",
"the",
"ExecutePaymentInterrupt",
".",
"If",
"it",
"is",
"set",
"to",
"active",
"then",
"the",
"next",
"request",
"to",
"the",
"basket",
"page",
"will",
"auto",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandler.class.php#L223-L233 |
31,413 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandler.class.php | TShopPaymentHandler.GetUserPaymentDataItem | public function GetUserPaymentDataItem($sItemName)
{
$aPaymentData = $this->GetUserPaymentData();
$sReturn = false;
if (is_array($aPaymentData) && isset($aPaymentData[$sItemName])) {
$sReturn = $aPaymentData[$sItemName];
}
return $sReturn;
} | php | public function GetUserPaymentDataItem($sItemName)
{
$aPaymentData = $this->GetUserPaymentData();
$sReturn = false;
if (is_array($aPaymentData) && isset($aPaymentData[$sItemName])) {
$sReturn = $aPaymentData[$sItemName];
}
return $sReturn;
} | [
"public",
"function",
"GetUserPaymentDataItem",
"(",
"$",
"sItemName",
")",
"{",
"$",
"aPaymentData",
"=",
"$",
"this",
"->",
"GetUserPaymentData",
"(",
")",
";",
"$",
"sReturn",
"=",
"false",
";",
"if",
"(",
"is_array",
"(",
"$",
"aPaymentData",
")",
"&&"... | return a variable from the user payment data. false if the variable is not found.
@param $sItemName
@return bool|string | [
"return",
"a",
"variable",
"from",
"the",
"user",
"payment",
"data",
".",
"false",
"if",
"the",
"variable",
"is",
"not",
"found",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandler.class.php#L366-L375 |
31,414 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandler.class.php | TShopPaymentHandler.Render | public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array())
{
$oView = new TViewParser();
$oShop = TdbShop::GetInstance();
$oView->AddVar('oShop', $oShop);
$oView->AddVar('oPaymentHandler', $this);
$aUserPaymentData = $this->GetUserPayment... | php | public function Render($sViewName = 'standard', $sViewType = 'Core', $aCallTimeVars = array())
{
$oView = new TViewParser();
$oShop = TdbShop::GetInstance();
$oView->AddVar('oShop', $oShop);
$oView->AddVar('oPaymentHandler', $this);
$aUserPaymentData = $this->GetUserPayment... | [
"public",
"function",
"Render",
"(",
"$",
"sViewName",
"=",
"'standard'",
",",
"$",
"sViewType",
"=",
"'Core'",
",",
"$",
"aCallTimeVars",
"=",
"array",
"(",
")",
")",
"{",
"$",
"oView",
"=",
"new",
"TViewParser",
"(",
")",
";",
"$",
"oShop",
"=",
"T... | used to display the basket article list.
@param string $sViewName - the view to use
@param string $sViewType - where the view is located (Core, Custom-Core, Customer)
@param array $aCallTimeVars - place any custom vars that you want to pass through the call here
@return string | [
"used",
"to",
"display",
"the",
"basket",
"article",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandler.class.php#L407-L422 |
31,415 | chameleon-system/chameleon-shop | src/ShopRatingServiceBundle/objects/webmodules/MTRatingList/MTRatingListCore.class.php | MTRatingListCore.SetActivePageSort | protected function SetActivePageSort()
{
$this->sActivePageSort = $this->GetUserInput('pagesort');
if (empty($this->sActivePageSort)) {
//load default
$this->sActivePageSort = $this->GetPageSortDefaultValue(); //default
$this->SetModuleSessionParameter('pagesort',... | php | protected function SetActivePageSort()
{
$this->sActivePageSort = $this->GetUserInput('pagesort');
if (empty($this->sActivePageSort)) {
//load default
$this->sActivePageSort = $this->GetPageSortDefaultValue(); //default
$this->SetModuleSessionParameter('pagesort',... | [
"protected",
"function",
"SetActivePageSort",
"(",
")",
"{",
"$",
"this",
"->",
"sActivePageSort",
"=",
"$",
"this",
"->",
"GetUserInput",
"(",
"'pagesort'",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"sActivePageSort",
")",
")",
"{",
"//load de... | Set active page sort, load from user input, session, default. | [
"Set",
"active",
"page",
"sort",
"load",
"from",
"user",
"input",
"session",
"default",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopRatingServiceBundle/objects/webmodules/MTRatingList/MTRatingListCore.class.php#L43-L66 |
31,416 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticleGroupList.class.php | TShopArticleGroupList.& | public static function &GetArticleGroups($iArticleId)
{
$oList = null;
$query = "SELECT `shop_article_group`.*
FROM `shop_article_group`
INNER JOIN `shop_article_article_group_mlt` ON `shop_article_group`.`id` = `shop_article_article_group_mlt`.`target_id`
... | php | public static function &GetArticleGroups($iArticleId)
{
$oList = null;
$query = "SELECT `shop_article_group`.*
FROM `shop_article_group`
INNER JOIN `shop_article_article_group_mlt` ON `shop_article_group`.`id` = `shop_article_article_group_mlt`.`target_id`
... | [
"public",
"static",
"function",
"&",
"GetArticleGroups",
"(",
"$",
"iArticleId",
")",
"{",
"$",
"oList",
"=",
"null",
";",
"$",
"query",
"=",
"\"SELECT `shop_article_group`.*\n FROM `shop_article_group`\n INNER JOIN `shop_article_article_group_mlt` ON ... | return article group list for an article.
@param int $iArticleId
@return TdbShopArticleGroupList | [
"return",
"article",
"group",
"list",
"for",
"an",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticleGroupList.class.php#L21-L34 |
31,417 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticleGroupList.class.php | TShopArticleGroupList.& | public function &GetMaxVat()
{
$iPointer = $this->getItemPointer();
$oMaxVatItem = null;
$this->GoToStart();
while ($oItem = &$this->Next()) {
$oCurrentVat = $oItem->GetVat();
if (!is_null($oCurrentVat)) {
if (is_null($oMaxVatItem)) {
... | php | public function &GetMaxVat()
{
$iPointer = $this->getItemPointer();
$oMaxVatItem = null;
$this->GoToStart();
while ($oItem = &$this->Next()) {
$oCurrentVat = $oItem->GetVat();
if (!is_null($oCurrentVat)) {
if (is_null($oMaxVatItem)) {
... | [
"public",
"function",
"&",
"GetMaxVat",
"(",
")",
"{",
"$",
"iPointer",
"=",
"$",
"this",
"->",
"getItemPointer",
"(",
")",
";",
"$",
"oMaxVatItem",
"=",
"null",
";",
"$",
"this",
"->",
"GoToStart",
"(",
")",
";",
"while",
"(",
"$",
"oItem",
"=",
"... | returns the max vat from the group list.
@return TdbShopVat | [
"returns",
"the",
"max",
"vat",
"from",
"the",
"group",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticleGroupList.class.php#L41-L59 |
31,418 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.cropSuffix | public function cropSuffix(string $fqn, string $suffix): string
{
if ($suffix === \substr($fqn, -\strlen($suffix))) {
return \substr($fqn, 0, -\strlen($suffix));
}
return $fqn;
} | php | public function cropSuffix(string $fqn, string $suffix): string
{
if ($suffix === \substr($fqn, -\strlen($suffix))) {
return \substr($fqn, 0, -\strlen($suffix));
}
return $fqn;
} | [
"public",
"function",
"cropSuffix",
"(",
"string",
"$",
"fqn",
",",
"string",
"$",
"suffix",
")",
":",
"string",
"{",
"if",
"(",
"$",
"suffix",
"===",
"\\",
"substr",
"(",
"$",
"fqn",
",",
"-",
"\\",
"strlen",
"(",
"$",
"suffix",
")",
")",
")",
"... | Crop a suffix from an FQN if it is there.
If it is not there, do nothing and return the FQN as is
@param string $fqn
@param string $suffix
@return string | [
"Crop",
"a",
"suffix",
"from",
"an",
"FQN",
"if",
"it",
"is",
"there",
"."
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L39-L46 |
31,419 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.basename | public function basename(string $namespace): string
{
$strrpos = \strrpos($namespace, '\\');
if (false === $strrpos) {
return $namespace;
}
return $this->tidy(\substr($namespace, $strrpos + 1));
} | php | public function basename(string $namespace): string
{
$strrpos = \strrpos($namespace, '\\');
if (false === $strrpos) {
return $namespace;
}
return $this->tidy(\substr($namespace, $strrpos + 1));
} | [
"public",
"function",
"basename",
"(",
"string",
"$",
"namespace",
")",
":",
"string",
"{",
"$",
"strrpos",
"=",
"\\",
"strrpos",
"(",
"$",
"namespace",
",",
"'\\\\'",
")",
";",
"if",
"(",
"false",
"===",
"$",
"strrpos",
")",
"{",
"return",
"$",
"nam... | Get the basename of a namespace
@param string $namespace
@return string | [
"Get",
"the",
"basename",
"of",
"a",
"namespace"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L97-L105 |
31,420 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getNamespaceRootToDirectoryFromFqn | public function getNamespaceRootToDirectoryFromFqn(string $fqn, string $directory): ?string
{
$strPos = \strrpos(
$fqn,
$directory
);
if (false !== $strPos) {
return $this->tidy(\substr($fqn, 0, $strPos + \strlen($directory)));
}
return nu... | php | public function getNamespaceRootToDirectoryFromFqn(string $fqn, string $directory): ?string
{
$strPos = \strrpos(
$fqn,
$directory
);
if (false !== $strPos) {
return $this->tidy(\substr($fqn, 0, $strPos + \strlen($directory)));
}
return nu... | [
"public",
"function",
"getNamespaceRootToDirectoryFromFqn",
"(",
"string",
"$",
"fqn",
",",
"string",
"$",
"directory",
")",
":",
"?",
"string",
"{",
"$",
"strPos",
"=",
"\\",
"strrpos",
"(",
"$",
"fqn",
",",
"$",
"directory",
")",
";",
"if",
"(",
"false... | Get the namespace root up to and including a specified directory
@param string $fqn
@param string $directory
@return null|string | [
"Get",
"the",
"namespace",
"root",
"up",
"to",
"and",
"including",
"a",
"specified",
"directory"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L174-L185 |
31,421 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getEntitySubNamespace | public function getEntitySubNamespace(
string $entityFqn
): string {
return $this->tidy(
\substr(
$entityFqn,
\strrpos(
$entityFqn,
'\\' . AbstractGenerator::ENTITIES_FOLDER_NAME . '\\'
)
... | php | public function getEntitySubNamespace(
string $entityFqn
): string {
return $this->tidy(
\substr(
$entityFqn,
\strrpos(
$entityFqn,
'\\' . AbstractGenerator::ENTITIES_FOLDER_NAME . '\\'
)
... | [
"public",
"function",
"getEntitySubNamespace",
"(",
"string",
"$",
"entityFqn",
")",
":",
"string",
"{",
"return",
"$",
"this",
"->",
"tidy",
"(",
"\\",
"substr",
"(",
"$",
"entityFqn",
",",
"\\",
"strrpos",
"(",
"$",
"entityFqn",
",",
"'\\\\'",
".",
"Ab... | Get the Namespace for an Entity, start from the Entities Fully Qualified Name base - normally
`\My\Project\Entities\`
@param string $entityFqn
@return string | [
"Get",
"the",
"Namespace",
"for",
"an",
"Entity",
"start",
"from",
"the",
"Entities",
"Fully",
"Qualified",
"Name",
"base",
"-",
"normally",
"\\",
"My",
"\\",
"Project",
"\\",
"Entities",
"\\"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L229-L242 |
31,422 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getTraitsNamespaceForEntity | public function getTraitsNamespaceForEntity(
string $entityFqn
): string {
$traitsNamespace = $this->getProjectNamespaceRootFromEntityFqn($entityFqn)
. AbstractGenerator::ENTITY_RELATIONS_NAMESPACE
. '\\' . $this->getEntitySubNamespace($entityFqn... | php | public function getTraitsNamespaceForEntity(
string $entityFqn
): string {
$traitsNamespace = $this->getProjectNamespaceRootFromEntityFqn($entityFqn)
. AbstractGenerator::ENTITY_RELATIONS_NAMESPACE
. '\\' . $this->getEntitySubNamespace($entityFqn... | [
"public",
"function",
"getTraitsNamespaceForEntity",
"(",
"string",
"$",
"entityFqn",
")",
":",
"string",
"{",
"$",
"traitsNamespace",
"=",
"$",
"this",
"->",
"getProjectNamespaceRootFromEntityFqn",
"(",
"$",
"entityFqn",
")",
".",
"AbstractGenerator",
"::",
"ENTITY... | Get the Fully Qualified Namespace root for Traits for the specified Entity
@param string $entityFqn
@return string | [
"Get",
"the",
"Fully",
"Qualified",
"Namespace",
"root",
"for",
"Traits",
"for",
"the",
"specified",
"Entity"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L251-L260 |
31,423 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getProjectNamespaceRootFromEntityFqn | public function getProjectNamespaceRootFromEntityFqn(string $entityFqn): string
{
return $this->tidy(
\substr(
$entityFqn,
0,
\strrpos(
$entityFqn,
'\\' . AbstractGenerator::ENTITIES_FOLDER_NAME . '\\'
... | php | public function getProjectNamespaceRootFromEntityFqn(string $entityFqn): string
{
return $this->tidy(
\substr(
$entityFqn,
0,
\strrpos(
$entityFqn,
'\\' . AbstractGenerator::ENTITIES_FOLDER_NAME . '\\'
... | [
"public",
"function",
"getProjectNamespaceRootFromEntityFqn",
"(",
"string",
"$",
"entityFqn",
")",
":",
"string",
"{",
"return",
"$",
"this",
"->",
"tidy",
"(",
"\\",
"substr",
"(",
"$",
"entityFqn",
",",
"0",
",",
"\\",
"strrpos",
"(",
"$",
"entityFqn",
... | Use the fully qualified name of two Entities to calculate the Project Namespace Root
- note: this assumes a single namespace level for entities, eg `Entities`
@param string $entityFqn
@return string | [
"Use",
"the",
"fully",
"qualified",
"name",
"of",
"two",
"Entities",
"to",
"calculate",
"the",
"Project",
"Namespace",
"Root"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L271-L283 |
31,424 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getHasPluralInterfaceFqnForEntity | public function getHasPluralInterfaceFqnForEntity(
string $entityFqn
): string {
$interfaceNamespace = $this->getInterfacesNamespaceForEntity($entityFqn);
return $interfaceNamespace . '\\Has' . ucfirst($entityFqn::getDoctrineStaticMeta()->getPlural()) . 'Interface';
} | php | public function getHasPluralInterfaceFqnForEntity(
string $entityFqn
): string {
$interfaceNamespace = $this->getInterfacesNamespaceForEntity($entityFqn);
return $interfaceNamespace . '\\Has' . ucfirst($entityFqn::getDoctrineStaticMeta()->getPlural()) . 'Interface';
} | [
"public",
"function",
"getHasPluralInterfaceFqnForEntity",
"(",
"string",
"$",
"entityFqn",
")",
":",
"string",
"{",
"$",
"interfaceNamespace",
"=",
"$",
"this",
"->",
"getInterfacesNamespaceForEntity",
"(",
"$",
"entityFqn",
")",
";",
"return",
"$",
"interfaceNames... | Get the Fully Qualified Namespace for the "HasEntities" interface for the specified Entity
@param string $entityFqn
@return string | [
"Get",
"the",
"Fully",
"Qualified",
"Namespace",
"for",
"the",
"HasEntities",
"interface",
"for",
"the",
"specified",
"Entity"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L292-L298 |
31,425 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getInterfacesNamespaceForEntity | public function getInterfacesNamespaceForEntity(
string $entityFqn
): string {
$interfacesNamespace = $this->getProjectNamespaceRootFromEntityFqn($entityFqn)
. AbstractGenerator::ENTITY_RELATIONS_NAMESPACE
. '\\' . $this->getEntitySubName... | php | public function getInterfacesNamespaceForEntity(
string $entityFqn
): string {
$interfacesNamespace = $this->getProjectNamespaceRootFromEntityFqn($entityFqn)
. AbstractGenerator::ENTITY_RELATIONS_NAMESPACE
. '\\' . $this->getEntitySubName... | [
"public",
"function",
"getInterfacesNamespaceForEntity",
"(",
"string",
"$",
"entityFqn",
")",
":",
"string",
"{",
"$",
"interfacesNamespace",
"=",
"$",
"this",
"->",
"getProjectNamespaceRootFromEntityFqn",
"(",
"$",
"entityFqn",
")",
".",
"AbstractGenerator",
"::",
... | Get the Fully Qualified Namespace root for Interfaces for the specified Entity
@param string $entityFqn
@return string | [
"Get",
"the",
"Fully",
"Qualified",
"Namespace",
"root",
"for",
"Interfaces",
"for",
"the",
"specified",
"Entity"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L307-L316 |
31,426 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getHasSingularInterfaceFqnForEntity | public function getHasSingularInterfaceFqnForEntity(
string $entityFqn
): string {
try {
$interfaceNamespace = $this->getInterfacesNamespaceForEntity($entityFqn);
return $interfaceNamespace . '\\Has' . ucfirst($entityFqn::getDoctrineStaticMeta()->getSingular())
... | php | public function getHasSingularInterfaceFqnForEntity(
string $entityFqn
): string {
try {
$interfaceNamespace = $this->getInterfacesNamespaceForEntity($entityFqn);
return $interfaceNamespace . '\\Has' . ucfirst($entityFqn::getDoctrineStaticMeta()->getSingular())
... | [
"public",
"function",
"getHasSingularInterfaceFqnForEntity",
"(",
"string",
"$",
"entityFqn",
")",
":",
"string",
"{",
"try",
"{",
"$",
"interfaceNamespace",
"=",
"$",
"this",
"->",
"getInterfacesNamespaceForEntity",
"(",
"$",
"entityFqn",
")",
";",
"return",
"$",... | Get the Fully Qualified Namespace for the "HasEntity" interface for the specified Entity
@param string $entityFqn
@return string
@throws DoctrineStaticMetaException | [
"Get",
"the",
"Fully",
"Qualified",
"Namespace",
"for",
"the",
"HasEntity",
"interface",
"for",
"the",
"specified",
"Entity"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L326-L341 |
31,427 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getProjectRootNamespaceFromComposerJson | public function getProjectRootNamespaceFromComposerJson(
string $dirForNamespace = 'src'
): string {
try {
$dirForNamespace = trim($dirForNamespace, '/');
$jsonPath = Config::getProjectRootDirectory() . '/composer.json';
$json = json_decode(\ts\f... | php | public function getProjectRootNamespaceFromComposerJson(
string $dirForNamespace = 'src'
): string {
try {
$dirForNamespace = trim($dirForNamespace, '/');
$jsonPath = Config::getProjectRootDirectory() . '/composer.json';
$json = json_decode(\ts\f... | [
"public",
"function",
"getProjectRootNamespaceFromComposerJson",
"(",
"string",
"$",
"dirForNamespace",
"=",
"'src'",
")",
":",
"string",
"{",
"try",
"{",
"$",
"dirForNamespace",
"=",
"trim",
"(",
"$",
"dirForNamespace",
",",
"'/'",
")",
";",
"$",
"jsonPath",
... | Read src autoloader from composer json
@param string $dirForNamespace
@return string
@throws DoctrineStaticMetaException
@SuppressWarnings(PHPMD.StaticAccess) | [
"Read",
"src",
"autoloader",
"from",
"composer",
"json"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L509-L542 |
31,428 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getOwningRelationsRootFqn | public function getOwningRelationsRootFqn(
string $projectRootNamespace,
array $subDirectories
): string {
$relationsRootFqn = $projectRootNamespace
. AbstractGenerator::ENTITY_RELATIONS_NAMESPACE . '\\';
if (count($subDirectories) > 0) {
$rela... | php | public function getOwningRelationsRootFqn(
string $projectRootNamespace,
array $subDirectories
): string {
$relationsRootFqn = $projectRootNamespace
. AbstractGenerator::ENTITY_RELATIONS_NAMESPACE . '\\';
if (count($subDirectories) > 0) {
$rela... | [
"public",
"function",
"getOwningRelationsRootFqn",
"(",
"string",
"$",
"projectRootNamespace",
",",
"array",
"$",
"subDirectories",
")",
":",
"string",
"{",
"$",
"relationsRootFqn",
"=",
"$",
"projectRootNamespace",
".",
"AbstractGenerator",
"::",
"ENTITY_RELATIONS_NAME... | Get the Namespace root for Entity Relations
@param string $projectRootNamespace
@param array $subDirectories
@return string | [
"Get",
"the",
"Namespace",
"root",
"for",
"Entity",
"Relations"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L594-L605 |
31,429 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getBaseHasTypeTraitFqn | public function getBaseHasTypeTraitFqn(
string $ownedHasName,
string $hasType
): string {
$required = \ts\stringContains($hasType, RelationsGenerator::PREFIX_REQUIRED)
? RelationsGenerator::PREFIX_REQUIRED
: '';
$hasType = \str_replace(RelationsGenerator::PRE... | php | public function getBaseHasTypeTraitFqn(
string $ownedHasName,
string $hasType
): string {
$required = \ts\stringContains($hasType, RelationsGenerator::PREFIX_REQUIRED)
? RelationsGenerator::PREFIX_REQUIRED
: '';
$hasType = \str_replace(RelationsGenerator::PRE... | [
"public",
"function",
"getBaseHasTypeTraitFqn",
"(",
"string",
"$",
"ownedHasName",
",",
"string",
"$",
"hasType",
")",
":",
"string",
"{",
"$",
"required",
"=",
"\\",
"ts",
"\\",
"stringContains",
"(",
"$",
"hasType",
",",
"RelationsGenerator",
"::",
"PREFIX_... | Normalise a has type, removing prefixes that are not required
Inverse hasTypes use the standard template without the prefix
The exclusion ot this are the ManyToMany and OneToOne relations
@param string $ownedHasName
@param string $hasType
@return string | [
"Normalise",
"a",
"has",
"type",
"removing",
"prefixes",
"that",
"are",
"not",
"required"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L618-L659 |
31,430 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/NamespaceHelper.php | NamespaceHelper.getOwningInterfaceFqn | public function getOwningInterfaceFqn(
string $hasType,
string $ownedEntityFqn,
string $projectRootNamespace = null,
string $srcFolder = AbstractCommand::DEFAULT_SRC_SUBFOLDER
): string {
try {
$ownedHasName = $this->getOwnedHasName($hasType, $ownedEntityFqn, $src... | php | public function getOwningInterfaceFqn(
string $hasType,
string $ownedEntityFqn,
string $projectRootNamespace = null,
string $srcFolder = AbstractCommand::DEFAULT_SRC_SUBFOLDER
): string {
try {
$ownedHasName = $this->getOwnedHasName($hasType, $ownedEntityFqn, $src... | [
"public",
"function",
"getOwningInterfaceFqn",
"(",
"string",
"$",
"hasType",
",",
"string",
"$",
"ownedEntityFqn",
",",
"string",
"$",
"projectRootNamespace",
"=",
"null",
",",
"string",
"$",
"srcFolder",
"=",
"AbstractCommand",
"::",
"DEFAULT_SRC_SUBFOLDER",
")",
... | Get the Fully Qualified Namespace for the Relation Interface for a specific Entity and hasType
@param string $hasType
@param string $ownedEntityFqn
@param string|null $projectRootNamespace
@param string $srcFolder
@return string
@throws DoctrineStaticMetaException | [
"Get",
"the",
"Fully",
"Qualified",
"Namespace",
"for",
"the",
"Relation",
"Interface",
"for",
"a",
"specific",
"Entity",
"and",
"hasType"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/NamespaceHelper.php#L729-L768 |
31,431 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.SetDefaultFieldVars | protected function SetDefaultFieldVars()
{
if ($this->global->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
$aPostUserData = $this->global->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME);
}
$aDefaultFieldDataList = array('comment' => '', 'author_email' => '', 'auth... | php | protected function SetDefaultFieldVars()
{
if ($this->global->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
$aPostUserData = $this->global->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME);
}
$aDefaultFieldDataList = array('comment' => '', 'author_email' => '', 'auth... | [
"protected",
"function",
"SetDefaultFieldVars",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"global",
"->",
"UserDataExists",
"(",
"TdbShopArticleReview",
"::",
"INPUT_BASE_NAME",
")",
")",
"{",
"$",
"aPostUserData",
"=",
"$",
"this",
"->",
"global",
"->",
... | Set default form parameter with init value or post values.
@return array | [
"Set",
"default",
"form",
"parameter",
"with",
"init",
"value",
"or",
"post",
"values",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L47-L63 |
31,432 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.AllowToCommentReview | protected function AllowToCommentReview()
{
if ($this->GetCommentTypeId()) {
$oModuleConfiguration = $this->GetModuleConfiguration();
if ($oModuleConfiguration->fieldAllowCommentReviews) {
return true;
}
}
return false;
} | php | protected function AllowToCommentReview()
{
if ($this->GetCommentTypeId()) {
$oModuleConfiguration = $this->GetModuleConfiguration();
if ($oModuleConfiguration->fieldAllowCommentReviews) {
return true;
}
}
return false;
} | [
"protected",
"function",
"AllowToCommentReview",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"GetCommentTypeId",
"(",
")",
")",
"{",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfiguration",
"(",
")",
";",
"if",
"(",
"$",
"oModuleConfig... | Checks if its allowed to write a comment to a review.
Returns always false if package pkgcomment was not installed.
@return bool | [
"Checks",
"if",
"its",
"allowed",
"to",
"write",
"a",
"comment",
"to",
"a",
"review",
".",
"Returns",
"always",
"false",
"if",
"package",
"pkgcomment",
"was",
"not",
"installed",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L118-L128 |
31,433 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.GetCommentTypeId | protected function GetCommentTypeId()
{
if (false === $this->sPkgCommentTypeId) {
$sQuery = "SELECT * FROM `pkg_comment_type` WHERE `pkg_comment_type`.`class_name` = 'TPkgCommentTypePkgShopArticleReview'";
$oRes = MySqlLegacySupport::getInstance()->query($sQuery);
if (MyS... | php | protected function GetCommentTypeId()
{
if (false === $this->sPkgCommentTypeId) {
$sQuery = "SELECT * FROM `pkg_comment_type` WHERE `pkg_comment_type`.`class_name` = 'TPkgCommentTypePkgShopArticleReview'";
$oRes = MySqlLegacySupport::getInstance()->query($sQuery);
if (MyS... | [
"protected",
"function",
"GetCommentTypeId",
"(",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"sPkgCommentTypeId",
")",
"{",
"$",
"sQuery",
"=",
"\"SELECT * FROM `pkg_comment_type` WHERE `pkg_comment_type`.`class_name` = 'TPkgCommentTypePkgShopArticleReview'\"",
"... | Get the comment type for article reviews.
@return TdbPkgCommentType | [
"Get",
"the",
"comment",
"type",
"for",
"article",
"reviews",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L135-L149 |
31,434 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.AllowReadReview | protected function AllowReadReview()
{
$bAllowReadReview = false;
$oModuleConfiguration = $this->GetModuleConfiguration();
$oUser = TdbDataExtranetUser::GetInstance();
if ($oModuleConfiguration->fieldAllowShowReviewLoggedinUsersOnly && $oUser->IsLoggedIn() || !$oModuleConfiguration->... | php | protected function AllowReadReview()
{
$bAllowReadReview = false;
$oModuleConfiguration = $this->GetModuleConfiguration();
$oUser = TdbDataExtranetUser::GetInstance();
if ($oModuleConfiguration->fieldAllowShowReviewLoggedinUsersOnly && $oUser->IsLoggedIn() || !$oModuleConfiguration->... | [
"protected",
"function",
"AllowReadReview",
"(",
")",
"{",
"$",
"bAllowReadReview",
"=",
"false",
";",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfiguration",
"(",
")",
";",
"$",
"oUser",
"=",
"TdbDataExtranetUser",
"::",
"GetInstance",
"(... | Checks if its allowed to red reviews.
@return bool | [
"Checks",
"if",
"its",
"allowed",
"to",
"red",
"reviews",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L156-L166 |
31,435 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.AllowWriteReview | protected function AllowWriteReview()
{
$bAllowWriteReview = false;
$oModuleConfiguration = $this->GetModuleConfiguration();
$oUser = TdbDataExtranetUser::GetInstance();
if ($oModuleConfiguration->fieldAllowWriteReviewLoggedinUsersOnly && $oUser->IsLoggedIn() || !$oModuleConfiguratio... | php | protected function AllowWriteReview()
{
$bAllowWriteReview = false;
$oModuleConfiguration = $this->GetModuleConfiguration();
$oUser = TdbDataExtranetUser::GetInstance();
if ($oModuleConfiguration->fieldAllowWriteReviewLoggedinUsersOnly && $oUser->IsLoggedIn() || !$oModuleConfiguratio... | [
"protected",
"function",
"AllowWriteReview",
"(",
")",
"{",
"$",
"bAllowWriteReview",
"=",
"false",
";",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfiguration",
"(",
")",
";",
"$",
"oUser",
"=",
"TdbDataExtranetUser",
"::",
"GetInstance",
... | Checks if its allowed to write reviews.
@return bool | [
"Checks",
"if",
"its",
"allowed",
"to",
"write",
"reviews",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L173-L183 |
31,436 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.AllowRateReviews | protected function AllowRateReviews()
{
$bAllowRateReviews = $this->AllowReadReview();
if ($bAllowRateReviews) {
$oModuleConfiguration = $this->GetModuleConfiguration();
if (!$oModuleConfiguration->fieldAllowRateReview) {
$bAllowRateReviews = false;
... | php | protected function AllowRateReviews()
{
$bAllowRateReviews = $this->AllowReadReview();
if ($bAllowRateReviews) {
$oModuleConfiguration = $this->GetModuleConfiguration();
if (!$oModuleConfiguration->fieldAllowRateReview) {
$bAllowRateReviews = false;
... | [
"protected",
"function",
"AllowRateReviews",
"(",
")",
"{",
"$",
"bAllowRateReviews",
"=",
"$",
"this",
"->",
"AllowReadReview",
"(",
")",
";",
"if",
"(",
"$",
"bAllowRateReviews",
")",
"{",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfig... | Checks if its allowed to rate reviews.
@return bool | [
"Checks",
"if",
"its",
"allowed",
"to",
"rate",
"reviews",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L190-L201 |
31,437 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.AllowReportReviews | protected function AllowReportReviews()
{
$bAllowRateReviews = $this->AllowReadReview();
if ($bAllowRateReviews) {
$oModuleConfiguration = $this->GetModuleConfiguration();
if (!$oModuleConfiguration->fieldAllowReportReviews) {
$bAllowRateReviews = false;
... | php | protected function AllowReportReviews()
{
$bAllowRateReviews = $this->AllowReadReview();
if ($bAllowRateReviews) {
$oModuleConfiguration = $this->GetModuleConfiguration();
if (!$oModuleConfiguration->fieldAllowReportReviews) {
$bAllowRateReviews = false;
... | [
"protected",
"function",
"AllowReportReviews",
"(",
")",
"{",
"$",
"bAllowRateReviews",
"=",
"$",
"this",
"->",
"AllowReadReview",
"(",
")",
";",
"if",
"(",
"$",
"bAllowRateReviews",
")",
"{",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConf... | Checks if its allowed to report reviews.
@return bool | [
"Checks",
"if",
"its",
"allowed",
"to",
"report",
"reviews",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L208-L219 |
31,438 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.NeedCaptcha | protected function NeedCaptcha()
{
$bNeedCaptcha = false;
$oUser = TdbDataExtranetUser::GetInstance();
$oModuleConfiguration = $this->GetModuleConfiguration();
if (!$oModuleConfiguration->fieldAllowWriteReviewLoggedinUsersOnly && !$oUser->IsLoggedIn()) {
$bNeedCaptcha = t... | php | protected function NeedCaptcha()
{
$bNeedCaptcha = false;
$oUser = TdbDataExtranetUser::GetInstance();
$oModuleConfiguration = $this->GetModuleConfiguration();
if (!$oModuleConfiguration->fieldAllowWriteReviewLoggedinUsersOnly && !$oUser->IsLoggedIn()) {
$bNeedCaptcha = t... | [
"protected",
"function",
"NeedCaptcha",
"(",
")",
"{",
"$",
"bNeedCaptcha",
"=",
"false",
";",
"$",
"oUser",
"=",
"TdbDataExtranetUser",
"::",
"GetInstance",
"(",
")",
";",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfiguration",
"(",
")"... | Check if captcha field is needed to show in forms.
@return bool | [
"Check",
"if",
"captcha",
"field",
"is",
"needed",
"to",
"show",
"in",
"forms",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L226-L236 |
31,439 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.GetModuleConfiguration | protected function GetModuleConfiguration()
{
if (is_null($this->oModuleConfiguration)) {
$oModuleConfiguration = TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration::GetNewInstance();
if ($oModuleConfiguration->LoadFromField('cms_tpl_module_instance_id', $this->instanceID)) ... | php | protected function GetModuleConfiguration()
{
if (is_null($this->oModuleConfiguration)) {
$oModuleConfiguration = TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration::GetNewInstance();
if ($oModuleConfiguration->LoadFromField('cms_tpl_module_instance_id', $this->instanceID)) ... | [
"protected",
"function",
"GetModuleConfiguration",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"oModuleConfiguration",
")",
")",
"{",
"$",
"oModuleConfiguration",
"=",
"TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration",
"::",
"GetNewInstance",
... | Get the module config for the module instance.
@return TdbPkgShopArticleReviewModuleShopArticleReviewConfiguration | [
"Get",
"the",
"module",
"config",
"for",
"the",
"module",
"instance",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L243-L253 |
31,440 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.RedirectToItemPage | protected function RedirectToItemPage($oReviewItem = null, $aAddParameter = array(), $bGoToWriteReviewFrom = false)
{
$oActivePage = $this->getActivePageService()->getActivePage();
$sRedirectURL = $oActivePage->GetRealURLPlain($aAddParameter);
if (null !== $oReviewItem) {
$sRedir... | php | protected function RedirectToItemPage($oReviewItem = null, $aAddParameter = array(), $bGoToWriteReviewFrom = false)
{
$oActivePage = $this->getActivePageService()->getActivePage();
$sRedirectURL = $oActivePage->GetRealURLPlain($aAddParameter);
if (null !== $oReviewItem) {
$sRedir... | [
"protected",
"function",
"RedirectToItemPage",
"(",
"$",
"oReviewItem",
"=",
"null",
",",
"$",
"aAddParameter",
"=",
"array",
"(",
")",
",",
"$",
"bGoToWriteReviewFrom",
"=",
"false",
")",
"{",
"$",
"oActivePage",
"=",
"$",
"this",
"->",
"getActivePageService"... | Redirect to review item page and set anchor to start of the review module.
@param array $aAddParameter | [
"Redirect",
"to",
"review",
"item",
"page",
"and",
"set",
"anchor",
"to",
"start",
"of",
"the",
"review",
"module",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L350-L365 |
31,441 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.GetReviewsForUser | protected function GetReviewsForUser()
{
$oUserReviews = null;
$oUser = TdbDataExtranetUser::GetInstance();
if ($oUser->IsLoggedIn()) {
$oUserReviews = $oUser->GetFieldShopArticleReviewList();
}
return $oUserReviews;
} | php | protected function GetReviewsForUser()
{
$oUserReviews = null;
$oUser = TdbDataExtranetUser::GetInstance();
if ($oUser->IsLoggedIn()) {
$oUserReviews = $oUser->GetFieldShopArticleReviewList();
}
return $oUserReviews;
} | [
"protected",
"function",
"GetReviewsForUser",
"(",
")",
"{",
"$",
"oUserReviews",
"=",
"null",
";",
"$",
"oUser",
"=",
"TdbDataExtranetUser",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oUser",
"->",
"IsLoggedIn",
"(",
")",
")",
"{",
"$",
"oUser... | get the reviews from logged in user. | [
"get",
"the",
"reviews",
"from",
"logged",
"in",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L389-L398 |
31,442 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.GetReviewsForArticle | protected function GetReviewsForArticle($oActiveArticle)
{
$oModuleConfiguration = $this->GetModuleConfiguration();
if ($oActiveArticle->IsVariant()) {
$oActiveArticle = $oActiveArticle->GetFieldVariantParent();
}
$oActiveCategory = TdbShop::GetActiveCategory();
... | php | protected function GetReviewsForArticle($oActiveArticle)
{
$oModuleConfiguration = $this->GetModuleConfiguration();
if ($oActiveArticle->IsVariant()) {
$oActiveArticle = $oActiveArticle->GetFieldVariantParent();
}
$oActiveCategory = TdbShop::GetActiveCategory();
... | [
"protected",
"function",
"GetReviewsForArticle",
"(",
"$",
"oActiveArticle",
")",
"{",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfiguration",
"(",
")",
";",
"if",
"(",
"$",
"oActiveArticle",
"->",
"IsVariant",
"(",
")",
")",
"{",
"$",
... | Get the reviews for given shop article.
@param TdbShopArticle $oActiveArticle
@return TdbShopArticleReviewList | [
"Get",
"the",
"reviews",
"for",
"given",
"shop",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L407-L425 |
31,443 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.UnlockReview | protected function UnlockReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_ACTION_ID)) {
$oReviewItem = TdbShopArticleReview::GetNewInstance();
if ($oReviewItem->Lo... | php | protected function UnlockReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_ACTION_ID)) {
$oReviewItem = TdbShopArticleReview::GetNewInstance();
if ($oReviewItem->Lo... | [
"protected",
"function",
"UnlockReview",
"(",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oGlobal",
"->",
"UserDataExists",
"... | Unlocks a locked review. | [
"Unlocks",
"a",
"locked",
"review",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L430-L458 |
31,444 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.ChangeReviewReportNotificationState | public function ChangeReviewReportNotificationState()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) {
$oReviewItem = TdbShopArticleReview::GetNewInstance();
... | php | public function ChangeReviewReportNotificationState()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) {
$oReviewItem = TdbShopArticleReview::GetNewInstance();
... | [
"public",
"function",
"ChangeReviewReportNotificationState",
"(",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oGlobal",
"->",
"... | Changes the report notification state for one review.
this can only be called from the owning user. | [
"Changes",
"the",
"report",
"notification",
"state",
"for",
"one",
"review",
".",
"this",
"can",
"only",
"be",
"called",
"from",
"the",
"owning",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L464-L488 |
31,445 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.DeleteReview | public function DeleteReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_ACTION_ID)) {
$this->DeleteReviewFromActionId();
} elseif ($oGlobal->UserDataExists(TdbShopArtic... | php | public function DeleteReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_ACTION_ID)) {
$this->DeleteReviewFromActionId();
} elseif ($oGlobal->UserDataExists(TdbShopArtic... | [
"public",
"function",
"DeleteReview",
"(",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oGlobal",
"->",
"UserDataExists",
"(",... | Deletes one review.
This function can only be called with valid action id or from owning user. | [
"Deletes",
"one",
"review",
".",
"This",
"function",
"can",
"only",
"be",
"called",
"with",
"valid",
"action",
"id",
"or",
"from",
"owning",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L494-L506 |
31,446 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.DeleteReviewFromActionId | protected function DeleteReviewFromActionId()
{
$oReviewItem = TdbShopArticleReview::GetNewInstance();
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oReviewItem->LoadFromField('action_id', $oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_... | php | protected function DeleteReviewFromActionId()
{
$oReviewItem = TdbShopArticleReview::GetNewInstance();
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oReviewItem->LoadFromField('action_id', $oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_... | [
"protected",
"function",
"DeleteReviewFromActionId",
"(",
")",
"{",
"$",
"oReviewItem",
"=",
"TdbShopArticleReview",
"::",
"GetNewInstance",
"(",
")",
";",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageMana... | Deletes one review with valid action id. | [
"Deletes",
"one",
"review",
"with",
"valid",
"action",
"id",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L511-L528 |
31,447 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.DeleteReviewFromOwner | protected function DeleteReviewFromOwner()
{
$oReviewItem = TdbShopArticleReview::GetNewInstance();
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) && $oReviewIt... | php | protected function DeleteReviewFromOwner()
{
$oReviewItem = TdbShopArticleReview::GetNewInstance();
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID)) && $oReviewIt... | [
"protected",
"function",
"DeleteReviewFromOwner",
"(",
")",
"{",
"$",
"oReviewItem",
"=",
"TdbShopArticleReview",
"::",
"GetNewInstance",
"(",
")",
";",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager... | Deletes one review if owner is logged in. | [
"Deletes",
"one",
"review",
"if",
"owner",
"is",
"logged",
"in",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L533-L546 |
31,448 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.DeleteConnectedComments | protected function DeleteConnectedComments($oReviewItem)
{
if ($this->AllowToCommentReview()) {
$sQuery = "SELECT `pkg_comment`.* FROM `cms_tbl_conf`
INNER JOIN `pkg_comment_type` ON `pkg_comment_type`.`cms_tbl_conf_id` = `cms_tbl_conf`.`id`
INNER JOIN `pk... | php | protected function DeleteConnectedComments($oReviewItem)
{
if ($this->AllowToCommentReview()) {
$sQuery = "SELECT `pkg_comment`.* FROM `cms_tbl_conf`
INNER JOIN `pkg_comment_type` ON `pkg_comment_type`.`cms_tbl_conf_id` = `cms_tbl_conf`.`id`
INNER JOIN `pk... | [
"protected",
"function",
"DeleteConnectedComments",
"(",
"$",
"oReviewItem",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"AllowToCommentReview",
"(",
")",
")",
"{",
"$",
"sQuery",
"=",
"\"SELECT `pkg_comment`.* FROM `cms_tbl_conf`\n INNER JOIN `pkg_comment_ty... | Deletes all comment for a given review.
@param TdbShopArticleReview $oReviewItem | [
"Deletes",
"all",
"comment",
"for",
"a",
"given",
"review",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L553-L569 |
31,449 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.ReportReview | public function ReportReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $this->AllowReportReviews()) {
$oReviewItem = TdbShopArticleReview::GetNewInstance();
... | php | public function ReportReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $this->AllowReportReviews()) {
$oReviewItem = TdbShopArticleReview::GetNewInstance();
... | [
"public",
"function",
"ReportReview",
"(",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oGlobal",
"->",
"UserDataExists",
"(",... | Reports one review to shop owner and lock reported review.
Shop owner owner will get an email with delete and unlock link. | [
"Reports",
"one",
"review",
"to",
"shop",
"owner",
"and",
"lock",
"reported",
"review",
".",
"Shop",
"owner",
"owner",
"will",
"get",
"an",
"email",
"with",
"delete",
"and",
"unlock",
"link",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L575-L604 |
31,450 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.RateReview | public function RateReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
$oReviewItem = TdbShopArticleReview::GetNewInstance();
if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) {
if ($this->A... | php | public function RateReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
$oReviewItem = TdbShopArticleReview::GetNewInstance();
if ($oReviewItem->Load($oGlobal->GetUserData(TdbShopArticleReview::URL_PARAM_REVIEW_ID))) {
if ($this->A... | [
"public",
"function",
"RateReview",
"(",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"$",
"oReviewItem",
"=",
"TdbShopArticleReview",
"::",
"Get... | Rates one review positive or negative. | [
"Rates",
"one",
"review",
"positive",
"or",
"negative",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L609-L630 |
31,451 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.EditReview | public function EditReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
$oEditReview = TdbShopArt... | php | public function EditReview()
{
$oGlobal = TGlobal::instance();
$oMsgManager = TCMSMessageManager::GetInstance();
if ($oGlobal->UserDataExists(TdbShopArticleReview::URL_PARAM_REVIEW_ID) && $oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
$oEditReview = TdbShopArt... | [
"public",
"function",
"EditReview",
"(",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oGlobal",
"->",
"UserDataExists",
"(",
... | Edit one review. | [
"Edit",
"one",
"review",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L635-L657 |
31,452 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.WriteReview | public function WriteReview()
{
//validate user input...
$oGlobal = TGlobal::instance();
$aUserData = array();
if ($this->AllowWriteReview()) {
$aUserData = $this->GetReviewWriteData();
$oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME);
... | php | public function WriteReview()
{
//validate user input...
$oGlobal = TGlobal::instance();
$aUserData = array();
if ($this->AllowWriteReview()) {
$aUserData = $this->GetReviewWriteData();
$oGlobal->GetuserData(TdbShopArticleReview::INPUT_BASE_NAME);
... | [
"public",
"function",
"WriteReview",
"(",
")",
"{",
"//validate user input...",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"aUserData",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"AllowWriteReview",
"(",
")",
")... | Writes a review. | [
"Writes",
"a",
"review",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L701-L720 |
31,453 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.CreateReview | protected function CreateReview($aUserData, $oArticle)
{
$oModuleConfiguration = $this->GetModuleConfiguration();
$oReviewItem = TdbShopArticleReview::GetNewInstance(); /*@var $oReviewItem TdbShopArticleReview*/
$aUserData['shop_article_id'] = $oArticle->id;
$oReviewItem->LoadFromRow... | php | protected function CreateReview($aUserData, $oArticle)
{
$oModuleConfiguration = $this->GetModuleConfiguration();
$oReviewItem = TdbShopArticleReview::GetNewInstance(); /*@var $oReviewItem TdbShopArticleReview*/
$aUserData['shop_article_id'] = $oArticle->id;
$oReviewItem->LoadFromRow... | [
"protected",
"function",
"CreateReview",
"(",
"$",
"aUserData",
",",
"$",
"oArticle",
")",
"{",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfiguration",
"(",
")",
";",
"$",
"oReviewItem",
"=",
"TdbShopArticleReview",
"::",
"GetNewInstance",
... | Create a new review for given article with given data.
@param array $aUserData
@param TdbShopArticle $oArticle
@return TdbShopArticleReview | [
"Create",
"a",
"new",
"review",
"for",
"given",
"article",
"with",
"given",
"data",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L759-L774 |
31,454 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.ValidateWriteReviewData | protected function ValidateWriteReviewData($aUserData)
{
$bDataValid = false;
$oMsgManager = TCMSMessageManager::GetInstance();
if (is_array($aUserData)) {
$bDataValid = true;
$sCaptcha = '';
if ($this->NeedCaptcha()) {
if (array_key_exists... | php | protected function ValidateWriteReviewData($aUserData)
{
$bDataValid = false;
$oMsgManager = TCMSMessageManager::GetInstance();
if (is_array($aUserData)) {
$bDataValid = true;
$sCaptcha = '';
if ($this->NeedCaptcha()) {
if (array_key_exists... | [
"protected",
"function",
"ValidateWriteReviewData",
"(",
"$",
"aUserData",
")",
"{",
"$",
"bDataValid",
"=",
"false",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"aUserData",
")",
"... | Validates given review data to write a new review.
@param array $aUserData
@return bool | [
"Validates",
"given",
"review",
"data",
"to",
"write",
"a",
"new",
"review",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L800-L835 |
31,455 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.NeedUserFieldForName | protected function NeedUserFieldForName()
{
$bNeedUserFieldForName = false;
$oUser = TdbDataExtranetUser::GetInstance();
$oModuleConfiguration = $this->GetModuleConfiguration();
if ($oModuleConfiguration->fieldAllowWriteReviewLoggedinUsersOnly) {
if (AuthorDisplayConstant... | php | protected function NeedUserFieldForName()
{
$bNeedUserFieldForName = false;
$oUser = TdbDataExtranetUser::GetInstance();
$oModuleConfiguration = $this->GetModuleConfiguration();
if ($oModuleConfiguration->fieldAllowWriteReviewLoggedinUsersOnly) {
if (AuthorDisplayConstant... | [
"protected",
"function",
"NeedUserFieldForName",
"(",
")",
"{",
"$",
"bNeedUserFieldForName",
"=",
"false",
";",
"$",
"oUser",
"=",
"TdbDataExtranetUser",
"::",
"GetInstance",
"(",
")",
";",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfigurat... | Checks if user have to enter user name manually or user name comes from logged in user.
@return bool | [
"Checks",
"if",
"user",
"have",
"to",
"enter",
"user",
"name",
"manually",
"or",
"user",
"name",
"comes",
"from",
"logged",
"in",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L875-L891 |
31,456 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.GetAuthorName | protected function GetAuthorName($sUserPostName = false)
{
$oModuleConfiguration = $this->GetModuleConfiguration();
$oAuthor = TdbDataExtranetUser::GetInstance();
if ($this->NeedUserFieldForName()) {
$sAuthor = $sUserPostName;
} else {
switch ($oModuleConfigur... | php | protected function GetAuthorName($sUserPostName = false)
{
$oModuleConfiguration = $this->GetModuleConfiguration();
$oAuthor = TdbDataExtranetUser::GetInstance();
if ($this->NeedUserFieldForName()) {
$sAuthor = $sUserPostName;
} else {
switch ($oModuleConfigur... | [
"protected",
"function",
"GetAuthorName",
"(",
"$",
"sUserPostName",
"=",
"false",
")",
"{",
"$",
"oModuleConfiguration",
"=",
"$",
"this",
"->",
"GetModuleConfiguration",
"(",
")",
";",
"$",
"oAuthor",
"=",
"TdbDataExtranetUser",
"::",
"GetInstance",
"(",
")",
... | Gets the author name from post data or form logged in user.
@param string $sUserPostName
@return bool|string | [
"Gets",
"the",
"author",
"name",
"from",
"post",
"data",
"or",
"form",
"logged",
"in",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L900-L934 |
31,457 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.GetCaptchaValue | protected function GetCaptchaValue()
{
$sCaptchaValue = false;
if (array_key_exists(self::SESSION_CAPTCHA, $_SESSION)) {
$sCaptchaValue = $_SESSION[self::SESSION_CAPTCHA];
}
return $sCaptchaValue;
} | php | protected function GetCaptchaValue()
{
$sCaptchaValue = false;
if (array_key_exists(self::SESSION_CAPTCHA, $_SESSION)) {
$sCaptchaValue = $_SESSION[self::SESSION_CAPTCHA];
}
return $sCaptchaValue;
} | [
"protected",
"function",
"GetCaptchaValue",
"(",
")",
"{",
"$",
"sCaptchaValue",
"=",
"false",
";",
"if",
"(",
"array_key_exists",
"(",
"self",
"::",
"SESSION_CAPTCHA",
",",
"$",
"_SESSION",
")",
")",
"{",
"$",
"sCaptchaValue",
"=",
"$",
"_SESSION",
"[",
"... | gets captcha value fro session.
@return bool | [
"gets",
"captcha",
"value",
"fro",
"session",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L941-L949 |
31,458 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php | MTPkgShopArticleReviewCore.GenerateCaptcha | protected function GenerateCaptcha()
{
$sCaptchaQuestion = false;
if ($this->NeedCaptcha()) {
$num1 = rand(1, 10);
$num2 = rand(1, 10);
$val = $num1 + $num2;
$_SESSION[self::SESSION_CAPTCHA] = $val;
$sCaptchaQuestion = ('Was ergibt '.$num1.... | php | protected function GenerateCaptcha()
{
$sCaptchaQuestion = false;
if ($this->NeedCaptcha()) {
$num1 = rand(1, 10);
$num2 = rand(1, 10);
$val = $num1 + $num2;
$_SESSION[self::SESSION_CAPTCHA] = $val;
$sCaptchaQuestion = ('Was ergibt '.$num1.... | [
"protected",
"function",
"GenerateCaptcha",
"(",
")",
"{",
"$",
"sCaptchaQuestion",
"=",
"false",
";",
"if",
"(",
"$",
"this",
"->",
"NeedCaptcha",
"(",
")",
")",
"{",
"$",
"num1",
"=",
"rand",
"(",
"1",
",",
"10",
")",
";",
"$",
"num2",
"=",
"rand... | Generates new captcha.
@return bool | [
"Generates",
"new",
"captcha",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/WebModules/MTPkgShopArticleReviewCore/MTPkgShopArticleReviewCore.class.php#L956-L968 |
31,459 | PGB-LIV/php-ms | src/Statistic/FalseDiscoveryRate.php | FalseDiscoveryRate.getScore | public function getScore($targetRate)
{
$score = 0;
foreach ($this->falseDiscoveryRates as $falseDiscoryRate) {
if ($falseDiscoryRate['FDR'] < $targetRate) {
$score = $falseDiscoryRate['score'];
continue;
}
break;
}
... | php | public function getScore($targetRate)
{
$score = 0;
foreach ($this->falseDiscoveryRates as $falseDiscoryRate) {
if ($falseDiscoryRate['FDR'] < $targetRate) {
$score = $falseDiscoryRate['score'];
continue;
}
break;
}
... | [
"public",
"function",
"getScore",
"(",
"$",
"targetRate",
")",
"{",
"$",
"score",
"=",
"0",
";",
"foreach",
"(",
"$",
"this",
"->",
"falseDiscoveryRates",
"as",
"$",
"falseDiscoryRate",
")",
"{",
"if",
"(",
"$",
"falseDiscoryRate",
"[",
"'FDR'",
"]",
"<"... | Gets the score that corresponds to the target FDR
@param float $targetRate | [
"Gets",
"the",
"score",
"that",
"corresponds",
"to",
"the",
"target",
"FDR"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Statistic/FalseDiscoveryRate.php#L75-L89 |
31,460 | PGB-LIV/php-ms | src/Statistic/FalseDiscoveryRate.php | FalseDiscoveryRate.getMatches | public function getMatches($targetRate)
{
$matches = 0;
foreach ($this->falseDiscoveryRates as $falseDiscoryRate) {
if ($falseDiscoryRate['FDR'] <= $targetRate) {
$matches ++;
continue;
}
break;
}
return $matches;
... | php | public function getMatches($targetRate)
{
$matches = 0;
foreach ($this->falseDiscoveryRates as $falseDiscoryRate) {
if ($falseDiscoryRate['FDR'] <= $targetRate) {
$matches ++;
continue;
}
break;
}
return $matches;
... | [
"public",
"function",
"getMatches",
"(",
"$",
"targetRate",
")",
"{",
"$",
"matches",
"=",
"0",
";",
"foreach",
"(",
"$",
"this",
"->",
"falseDiscoveryRates",
"as",
"$",
"falseDiscoryRate",
")",
"{",
"if",
"(",
"$",
"falseDiscoryRate",
"[",
"'FDR'",
"]",
... | Gets the number of matches for the target FDR
@param float $targetRate | [
"Gets",
"the",
"number",
"of",
"matches",
"for",
"the",
"target",
"FDR"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Statistic/FalseDiscoveryRate.php#L96-L109 |
31,461 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php | TPkgShopProductExportBaseEndPoint.Run | public function Run()
{
$bSuccess = false;
set_time_limit(1800);
TCacheManager::SetDisableCaching(true);
TCacheManagerRuntimeCache::SetEnableAutoCaching(false);
if ($this->Prepare()) {
$bSuccess = $this->Perform();
}
$this->Cleanup($bSuccess);
... | php | public function Run()
{
$bSuccess = false;
set_time_limit(1800);
TCacheManager::SetDisableCaching(true);
TCacheManagerRuntimeCache::SetEnableAutoCaching(false);
if ($this->Prepare()) {
$bSuccess = $this->Perform();
}
$this->Cleanup($bSuccess);
... | [
"public",
"function",
"Run",
"(",
")",
"{",
"$",
"bSuccess",
"=",
"false",
";",
"set_time_limit",
"(",
"1800",
")",
";",
"TCacheManager",
"::",
"SetDisableCaching",
"(",
"true",
")",
";",
"TCacheManagerRuntimeCache",
"::",
"SetEnableAutoCaching",
"(",
"false",
... | Run the export. returns true if the export was successful, otherwise false
this method should not be overwritten in child classes.
@return bool | [
"Run",
"the",
"export",
".",
"returns",
"true",
"if",
"the",
"export",
"was",
"successful",
"otherwise",
"false",
"this",
"method",
"should",
"not",
"be",
"overwritten",
"in",
"child",
"classes",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php#L85-L100 |
31,462 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php | TPkgShopProductExportBaseEndPoint.Perform | protected function Perform()
{
$bSuccess = true;
$this->PreArticleListHandling();
$this->HandleArticleList();
$this->PostArticleListHandling();
return $bSuccess;
} | php | protected function Perform()
{
$bSuccess = true;
$this->PreArticleListHandling();
$this->HandleArticleList();
$this->PostArticleListHandling();
return $bSuccess;
} | [
"protected",
"function",
"Perform",
"(",
")",
"{",
"$",
"bSuccess",
"=",
"true",
";",
"$",
"this",
"->",
"PreArticleListHandling",
"(",
")",
";",
"$",
"this",
"->",
"HandleArticleList",
"(",
")",
";",
"$",
"this",
"->",
"PostArticleListHandling",
"(",
")",... | perform the actual export work. return true if the export was successful, otherwise false.
@return bool | [
"perform",
"the",
"actual",
"export",
"work",
".",
"return",
"true",
"if",
"the",
"export",
"was",
"successful",
"otherwise",
"false",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php#L138-L147 |
31,463 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php | TPkgShopProductExportBaseEndPoint.getAttributeName | public function getAttributeName($sIdentifier)
{
static $aAttributesForSystemNames = null;
static $aAttributesForIds = null;
if (null === $aAttributesForSystemNames && null === $aAttributesForIds) {
$oAttributesList = TdbShopAttributeList::GetList();
while ($oAttribut... | php | public function getAttributeName($sIdentifier)
{
static $aAttributesForSystemNames = null;
static $aAttributesForIds = null;
if (null === $aAttributesForSystemNames && null === $aAttributesForIds) {
$oAttributesList = TdbShopAttributeList::GetList();
while ($oAttribut... | [
"public",
"function",
"getAttributeName",
"(",
"$",
"sIdentifier",
")",
"{",
"static",
"$",
"aAttributesForSystemNames",
"=",
"null",
";",
"static",
"$",
"aAttributesForIds",
"=",
"null",
";",
"if",
"(",
"null",
"===",
"$",
"aAttributesForSystemNames",
"&&",
"nu... | load attribute by system_name field and return the name.
@param string $sIdentifier
@return string | [
"load",
"attribute",
"by",
"system_name",
"field",
"and",
"return",
"the",
"name",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php#L241-L260 |
31,464 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php | TPkgShopProductExportBaseEndPoint.GetArticleAttributeValueListForAttributeNames | public function GetArticleAttributeValueListForAttributeNames(
&$oArticle,
$aAttributeNames,
$sFieldName = 'system_name'
) {
$aList = array();
foreach ($aAttributeNames as $sAttributeName) {
$aList[$sAttributeName] = $this->GetArticleAttributeValueForAttributeName... | php | public function GetArticleAttributeValueListForAttributeNames(
&$oArticle,
$aAttributeNames,
$sFieldName = 'system_name'
) {
$aList = array();
foreach ($aAttributeNames as $sAttributeName) {
$aList[$sAttributeName] = $this->GetArticleAttributeValueForAttributeName... | [
"public",
"function",
"GetArticleAttributeValueListForAttributeNames",
"(",
"&",
"$",
"oArticle",
",",
"$",
"aAttributeNames",
",",
"$",
"sFieldName",
"=",
"'system_name'",
")",
"{",
"$",
"aList",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"aAttributeName... | returns an array with a nested array of values for each requested attribute.
@param TdbShopArticle $oArticle
@param array $aAttributeNames
@param string $sFieldName
@return array|null | [
"returns",
"an",
"array",
"with",
"a",
"nested",
"array",
"of",
"values",
"for",
"each",
"requested",
"attribute",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php#L271-L287 |
31,465 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php | TPkgShopProductExportBaseEndPoint.getArticleImageLink | protected function getArticleImageLink(&$oArticle, $iWidth = null)
{
$sLink = '';
$oArticleImage = $oArticle->GetPrimaryImage();
if (null !== $oArticleImage) {
$oImage = $oArticleImage->GetImage(0, 'cms_media_id');
if (null !== $oImage) {
if (is_int($i... | php | protected function getArticleImageLink(&$oArticle, $iWidth = null)
{
$sLink = '';
$oArticleImage = $oArticle->GetPrimaryImage();
if (null !== $oArticleImage) {
$oImage = $oArticleImage->GetImage(0, 'cms_media_id');
if (null !== $oImage) {
if (is_int($i... | [
"protected",
"function",
"getArticleImageLink",
"(",
"&",
"$",
"oArticle",
",",
"$",
"iWidth",
"=",
"null",
")",
"{",
"$",
"sLink",
"=",
"''",
";",
"$",
"oArticleImage",
"=",
"$",
"oArticle",
"->",
"GetPrimaryImage",
"(",
")",
";",
"if",
"(",
"null",
"... | returns the link to the article image
you can set iWidth to get thumbnail links.
@param int|null $iWidth
@param TdbShopArticle $oArticle
@return string | [
"returns",
"the",
"link",
"to",
"the",
"article",
"image",
"you",
"can",
"set",
"iWidth",
"to",
"get",
"thumbnail",
"links",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php#L393-L410 |
31,466 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php | TPkgShopProductExportBaseEndPoint.GetTmpCacheFileFromCacheFileName | public static function GetTmpCacheFileFromCacheFileName($sCacheFileName)
{
$sCacheTmpFileName = false;
$aFileInfo = pathinfo($sCacheFileName);
if (is_array($aFileInfo) && isset($aFileInfo['filename'])) {
$sCacheTmpFileName = 'generate_tmp_'.$aFileInfo['filename'];
$sC... | php | public static function GetTmpCacheFileFromCacheFileName($sCacheFileName)
{
$sCacheTmpFileName = false;
$aFileInfo = pathinfo($sCacheFileName);
if (is_array($aFileInfo) && isset($aFileInfo['filename'])) {
$sCacheTmpFileName = 'generate_tmp_'.$aFileInfo['filename'];
$sC... | [
"public",
"static",
"function",
"GetTmpCacheFileFromCacheFileName",
"(",
"$",
"sCacheFileName",
")",
"{",
"$",
"sCacheTmpFileName",
"=",
"false",
";",
"$",
"aFileInfo",
"=",
"pathinfo",
"(",
"$",
"sCacheFileName",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"aF... | Returns tmp cache file name generated from cache file name.
@static
@param string $sCacheFileName
@return bool|mixed|string | [
"Returns",
"tmp",
"cache",
"file",
"name",
"generated",
"from",
"cache",
"file",
"name",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php#L537-L547 |
31,467 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php | TPkgShopProductExportBaseEndPoint.getAvailablePaymentList | protected function getAvailablePaymentList()
{
static $oPaymentList = null;
if (null === $oPaymentList) {
$sQuery = "SELECT * FROM `shop_payment_method` WHERE `shop_payment_method`.`active` = '1'";
$oPaymentList = TdbShopPaymentMethodList::GetList($sQuery);
}
... | php | protected function getAvailablePaymentList()
{
static $oPaymentList = null;
if (null === $oPaymentList) {
$sQuery = "SELECT * FROM `shop_payment_method` WHERE `shop_payment_method`.`active` = '1'";
$oPaymentList = TdbShopPaymentMethodList::GetList($sQuery);
}
... | [
"protected",
"function",
"getAvailablePaymentList",
"(",
")",
"{",
"static",
"$",
"oPaymentList",
"=",
"null",
";",
"if",
"(",
"null",
"===",
"$",
"oPaymentList",
")",
"{",
"$",
"sQuery",
"=",
"\"SELECT * FROM `shop_payment_method` WHERE `shop_payment_method`.`active` =... | loads list of available payment methods.
@return TdbShopPaymentMethodList|null | [
"loads",
"list",
"of",
"available",
"payment",
"methods",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php#L575-L585 |
31,468 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php | TPkgShopProductExportBaseEndPoint.getAvailablePaymentListAsString | protected function getAvailablePaymentListAsString()
{
static $sPaymentMethods = null;
if (null === $sPaymentMethods) {
$sPaymentMethods = '';
$oPaymentList = $this->getAvailablePaymentList();
if (null !== $oPaymentList) {
if ($oPaymentList->Lengt... | php | protected function getAvailablePaymentListAsString()
{
static $sPaymentMethods = null;
if (null === $sPaymentMethods) {
$sPaymentMethods = '';
$oPaymentList = $this->getAvailablePaymentList();
if (null !== $oPaymentList) {
if ($oPaymentList->Lengt... | [
"protected",
"function",
"getAvailablePaymentListAsString",
"(",
")",
"{",
"static",
"$",
"sPaymentMethods",
"=",
"null",
";",
"if",
"(",
"null",
"===",
"$",
"sPaymentMethods",
")",
"{",
"$",
"sPaymentMethods",
"=",
"''",
";",
"$",
"oPaymentList",
"=",
"$",
... | returns comma separated string of payment methods.
@return string | [
"returns",
"comma",
"separated",
"string",
"of",
"payment",
"methods",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportBaseEndPoint.class.php#L592-L616 |
31,469 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSFields/TCMSFieldShopVariantDetails.class.php | TCMSFieldShopVariantDetails.RenderVariantDetails | protected function RenderVariantDetails($sViewName, $aCallTimeVars = array())
{
$oView = new TViewParser();
$aActivatedIds = $this->oTableRow->GetMLTIdList('shop_variant_type_value', 'shop_variant_type_value_mlt');
$oView->AddVar('aActivatedIds', $aActivatedIds);
$oView->AddVar('oFie... | php | protected function RenderVariantDetails($sViewName, $aCallTimeVars = array())
{
$oView = new TViewParser();
$aActivatedIds = $this->oTableRow->GetMLTIdList('shop_variant_type_value', 'shop_variant_type_value_mlt');
$oView->AddVar('aActivatedIds', $aActivatedIds);
$oView->AddVar('oFie... | [
"protected",
"function",
"RenderVariantDetails",
"(",
"$",
"sViewName",
",",
"$",
"aCallTimeVars",
"=",
"array",
"(",
")",
")",
"{",
"$",
"oView",
"=",
"new",
"TViewParser",
"(",
")",
";",
"$",
"aActivatedIds",
"=",
"$",
"this",
"->",
"oTableRow",
"->",
... | render field details.
@param string $sViewName
@param array $aCallTimeVars
@return string | [
"render",
"field",
"details",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSFields/TCMSFieldShopVariantDetails.class.php#L107-L116 |
31,470 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSFields/TCMSFieldShopVariantDetails.class.php | TCMSFieldShopVariantDetails.GetSQL | public function GetSQL()
{
/**
* @var array $aNewValues
*/
$aNewValues = $this->getInputFilterUtil()->getFilteredInput($this->name.'_new');
if (!is_array($this->data)) {
$this->data = array();
} elseif (array_key_exists('x', $this->data)) {
... | php | public function GetSQL()
{
/**
* @var array $aNewValues
*/
$aNewValues = $this->getInputFilterUtil()->getFilteredInput($this->name.'_new');
if (!is_array($this->data)) {
$this->data = array();
} elseif (array_key_exists('x', $this->data)) {
... | [
"public",
"function",
"GetSQL",
"(",
")",
"{",
"/**\n * @var array $aNewValues\n */",
"$",
"aNewValues",
"=",
"$",
"this",
"->",
"getInputFilterUtil",
"(",
")",
"->",
"getFilteredInput",
"(",
"$",
"this",
"->",
"name",
".",
"'_new'",
")",
";",
"i... | overwrites sql method to ensure that the connecting mlt is filled properly.
{@inheritdoc} | [
"overwrites",
"sql",
"method",
"to",
"ensure",
"that",
"the",
"connecting",
"mlt",
"is",
"filled",
"properly",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSFields/TCMSFieldShopVariantDetails.class.php#L160-L207 |
31,471 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSFields/TCMSFieldShopVariantDetails.class.php | TCMSFieldShopVariantDetails.generateVariants | public function generateVariants()
{
/**
* @var array|null $aVariantParameters
*/
$aVariantParameters = $this->getInputFilterUtil()->getFilteredInput('variantParameters');
if (null === $aVariantParameters) {
return '';
}
foreach ($aVariantParame... | php | public function generateVariants()
{
/**
* @var array|null $aVariantParameters
*/
$aVariantParameters = $this->getInputFilterUtil()->getFilteredInput('variantParameters');
if (null === $aVariantParameters) {
return '';
}
foreach ($aVariantParame... | [
"public",
"function",
"generateVariants",
"(",
")",
"{",
"/**\n * @var array|null $aVariantParameters\n */",
"$",
"aVariantParameters",
"=",
"$",
"this",
"->",
"getInputFilterUtil",
"(",
")",
"->",
"getFilteredInput",
"(",
"'variantParameters'",
")",
";",
... | called via ajax
generates all variants that where checked in the field matrix.
@return string | [
"called",
"via",
"ajax",
"generates",
"all",
"variants",
"that",
"where",
"checked",
"in",
"the",
"field",
"matrix",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSFields/TCMSFieldShopVariantDetails.class.php#L215-L248 |
31,472 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopCategory.class.php | TCMSTableEditorShopCategory.UpdateInheritableProperties | protected function UpdateInheritableProperties($oOwningCategory, $oCategory)
{
$activeValue = '1';
if (false === $oOwningCategory->fieldActive || false === $oCategory->parentCategoriesAreActive()) {
$activeValue = '0';
}
$oTableEditor = TTools::GetTableEditorManager($this... | php | protected function UpdateInheritableProperties($oOwningCategory, $oCategory)
{
$activeValue = '1';
if (false === $oOwningCategory->fieldActive || false === $oCategory->parentCategoriesAreActive()) {
$activeValue = '0';
}
$oTableEditor = TTools::GetTableEditorManager($this... | [
"protected",
"function",
"UpdateInheritableProperties",
"(",
"$",
"oOwningCategory",
",",
"$",
"oCategory",
")",
"{",
"$",
"activeValue",
"=",
"'1'",
";",
"if",
"(",
"false",
"===",
"$",
"oOwningCategory",
"->",
"fieldActive",
"||",
"false",
"===",
"$",
"oCate... | update recursive properties in oCategory based on oOwningCategory.
@param TdbShopCategory $oOwningCategory
@param TdbShopCategory $oCategory | [
"update",
"recursive",
"properties",
"in",
"oCategory",
"based",
"on",
"oOwningCategory",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopCategory.class.php#L51-L60 |
31,473 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopCategory.class.php | TCMSTableEditorShopCategory.UpdatePageNaviBreadCrumb | public function UpdatePageNaviBreadCrumb()
{
$sEditLanguage = $this->oTableConf->GetLanguage();
$breadcrumbs = self::GetNavigationBreadCrumbs($this->sId, $sEditLanguage);
$this->SaveField('url_path', $breadcrumbs);
// now we also need to update all children of this category...
... | php | public function UpdatePageNaviBreadCrumb()
{
$sEditLanguage = $this->oTableConf->GetLanguage();
$breadcrumbs = self::GetNavigationBreadCrumbs($this->sId, $sEditLanguage);
$this->SaveField('url_path', $breadcrumbs);
// now we also need to update all children of this category...
... | [
"public",
"function",
"UpdatePageNaviBreadCrumb",
"(",
")",
"{",
"$",
"sEditLanguage",
"=",
"$",
"this",
"->",
"oTableConf",
"->",
"GetLanguage",
"(",
")",
";",
"$",
"breadcrumbs",
"=",
"self",
"::",
"GetNavigationBreadCrumbs",
"(",
"$",
"this",
"->",
"sId",
... | update the page navi breadcrumb. | [
"update",
"the",
"page",
"navi",
"breadcrumb",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopCategory.class.php#L75-L96 |
31,474 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopCategory.class.php | TCMSTableEditorShopCategory.GetNavigationBreadCrumbs | public static function GetNavigationBreadCrumbs($id, $sLanguageID = null)
{
$sBreadCrumb = '';
$oCategory = TdbShopCategory::GetNewInstance();
if (!is_null($sLanguageID)) {
$oCategory->SetLanguage($sLanguageID);
}
/** @var $oCategory TdbShopCategory */
if ... | php | public static function GetNavigationBreadCrumbs($id, $sLanguageID = null)
{
$sBreadCrumb = '';
$oCategory = TdbShopCategory::GetNewInstance();
if (!is_null($sLanguageID)) {
$oCategory->SetLanguage($sLanguageID);
}
/** @var $oCategory TdbShopCategory */
if ... | [
"public",
"static",
"function",
"GetNavigationBreadCrumbs",
"(",
"$",
"id",
",",
"$",
"sLanguageID",
"=",
"null",
")",
"{",
"$",
"sBreadCrumb",
"=",
"''",
";",
"$",
"oCategory",
"=",
"TdbShopCategory",
"::",
"GetNewInstance",
"(",
")",
";",
"if",
"(",
"!",... | returns the breadcrumb navigation as plaintext.
@param string $id - id of the page to update
@param string $sLanguageID
@return string | [
"returns",
"the",
"breadcrumb",
"navigation",
"as",
"plaintext",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSTableEditor/TCMSTableEditorShopCategory.class.php#L106-L126 |
31,475 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TCMSTableEditor/TCMSShopTableEditor_ShopDiscount.class.php | TCMSShopTableEditor_ShopDiscount.PostSaveHook | protected function PostSaveHook(&$oFields, &$oPostTable)
{
parent::PostSaveHook($oFields, $oPostTable);
$this->oTable->ClearCacheOnAllAffectedArticles();
} | php | protected function PostSaveHook(&$oFields, &$oPostTable)
{
parent::PostSaveHook($oFields, $oPostTable);
$this->oTable->ClearCacheOnAllAffectedArticles();
} | [
"protected",
"function",
"PostSaveHook",
"(",
"&",
"$",
"oFields",
",",
"&",
"$",
"oPostTable",
")",
"{",
"parent",
"::",
"PostSaveHook",
"(",
"$",
"oFields",
",",
"$",
"oPostTable",
")",
";",
"$",
"this",
"->",
"oTable",
"->",
"ClearCacheOnAllAffectedArticl... | we need to cache trigger all articles connected to the discount.
@param TIterator $oFields holds an iterator of all field classes from DB table with the posted values or default if no post data is present
@param TCMSRecord $oPostTable holds the record object of all posted data | [
"we",
"need",
"to",
"cache",
"trigger",
"all",
"articles",
"connected",
"to",
"the",
"discount",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSTableEditor/TCMSShopTableEditor_ShopDiscount.class.php#L23-L27 |
31,476 | PGB-LIV/php-ms | src/Core/Modification.php | Modification.setLocation | public function setLocation($location)
{
if (! is_int($location)) {
throw new \InvalidArgumentException(
'Argument 1 must be an int value. Valued passed is of type ' . gettype($location));
}
$this->location = $location;
} | php | public function setLocation($location)
{
if (! is_int($location)) {
throw new \InvalidArgumentException(
'Argument 1 must be an int value. Valued passed is of type ' . gettype($location));
}
$this->location = $location;
} | [
"public",
"function",
"setLocation",
"(",
"$",
"location",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"location",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Argument 1 must be an int value. Valued passed is of type '",
".",
"gettype",... | Sets the location for this modification
@param int $location
The location to set this modification at
@throws \InvalidArgumentException If argument 1 is not of type int | [
"Sets",
"the",
"location",
"for",
"this",
"modification"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Modification.php#L69-L77 |
31,477 | PGB-LIV/php-ms | src/Core/Modification.php | Modification.setMonoisotopicMass | public function setMonoisotopicMass($mass)
{
if (! is_float($mass) && ! is_int($mass)) {
throw new \InvalidArgumentException(
'Argument 1 must be a float or integer value. Valued passed is of type ' . gettype($mass));
}
$this->monoisotopicMass = $mass;
... | php | public function setMonoisotopicMass($mass)
{
if (! is_float($mass) && ! is_int($mass)) {
throw new \InvalidArgumentException(
'Argument 1 must be a float or integer value. Valued passed is of type ' . gettype($mass));
}
$this->monoisotopicMass = $mass;
... | [
"public",
"function",
"setMonoisotopicMass",
"(",
"$",
"mass",
")",
"{",
"if",
"(",
"!",
"is_float",
"(",
"$",
"mass",
")",
"&&",
"!",
"is_int",
"(",
"$",
"mass",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Argument 1 must be a ... | Sets the monoisotopic mass for this modification
@param float $mass
The monoisotopic mass to set
@throws \InvalidArgumentException If argument 1 is not of type float | [
"Sets",
"the",
"monoisotopic",
"mass",
"for",
"this",
"modification"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Modification.php#L96-L104 |
31,478 | PGB-LIV/php-ms | src/Core/Modification.php | Modification.setResidues | public function setResidues(array $residues)
{
if (empty($residues)) {
throw new \InvalidArgumentException('Argument 1 must not be empty.');
}
foreach ($residues as $residue) {
if (!preg_match('/^[A-Z]$/', $residue)) {
throw new \InvalidArgume... | php | public function setResidues(array $residues)
{
if (empty($residues)) {
throw new \InvalidArgumentException('Argument 1 must not be empty.');
}
foreach ($residues as $residue) {
if (!preg_match('/^[A-Z]$/', $residue)) {
throw new \InvalidArgume... | [
"public",
"function",
"setResidues",
"(",
"array",
"$",
"residues",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"residues",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Argument 1 must not be empty.'",
")",
";",
"}",
"foreach",
"(",
"$... | Set residues for this modification
@param array $residues
Array of residues this modification may occur on
@throws \InvalidArgumentException If argument 1 is not of type float | [
"Set",
"residues",
"for",
"this",
"modification"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Modification.php#L153-L170 |
31,479 | PGB-LIV/php-ms | src/Core/Modification.php | Modification.setPosition | public function setPosition($position)
{
switch ($position) {
case Modification::POSITION_ANY:
case Modification::POSITION_NTERM:
case Modification::POSITION_CTERM:
case Modification::POSITION_PROTEIN_NTERM:
case Modification::POSITION_PROTEIN_CTER... | php | public function setPosition($position)
{
switch ($position) {
case Modification::POSITION_ANY:
case Modification::POSITION_NTERM:
case Modification::POSITION_CTERM:
case Modification::POSITION_PROTEIN_NTERM:
case Modification::POSITION_PROTEIN_CTER... | [
"public",
"function",
"setPosition",
"(",
"$",
"position",
")",
"{",
"switch",
"(",
"$",
"position",
")",
"{",
"case",
"Modification",
"::",
"POSITION_ANY",
":",
"case",
"Modification",
"::",
"POSITION_NTERM",
":",
"case",
"Modification",
"::",
"POSITION_CTERM",... | Sets the position this modification can occur on within the peptide or protein.
Default is 'Any'.
@param int $position
Position the modification can occur, see POSITION_ for list of options.
@throws \InvalidArgumentException If unknown position specified | [
"Sets",
"the",
"position",
"this",
"modification",
"can",
"occur",
"on",
"within",
"the",
"peptide",
"or",
"protein",
".",
"Default",
"is",
"Any",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Modification.php#L214-L228 |
31,480 | chameleon-system/chameleon-shop | src/ShopAffiliateBundle/objects/db/TPkgShopAffiliatePrograms/TPkgShopAffiliate_TradeDoubler.class.php | TPkgShopAffiliate_TradeDoubler.GetAdditionalViewVariables | protected function GetAdditionalViewVariables(&$oOrder, &$aParameter)
{
parent::GetAdditionalViewVariables($oOrder, $aParameter);
$aParameter['currency'] = $this->GetValueFromArray($aParameter, 'currency');
$aParameter['organization'] = $this->GetValueFromArray($aParameter, 'organization');... | php | protected function GetAdditionalViewVariables(&$oOrder, &$aParameter)
{
parent::GetAdditionalViewVariables($oOrder, $aParameter);
$aParameter['currency'] = $this->GetValueFromArray($aParameter, 'currency');
$aParameter['organization'] = $this->GetValueFromArray($aParameter, 'organization');... | [
"protected",
"function",
"GetAdditionalViewVariables",
"(",
"&",
"$",
"oOrder",
",",
"&",
"$",
"aParameter",
")",
"{",
"parent",
"::",
"GetAdditionalViewVariables",
"(",
"$",
"oOrder",
",",
"$",
"aParameter",
")",
";",
"$",
"aParameter",
"[",
"'currency'",
"]"... | add custom vars to the view.
@param TdbShopOrder $oOrder
@param array $aParameter | [
"add",
"custom",
"vars",
"to",
"the",
"view",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopAffiliateBundle/objects/db/TPkgShopAffiliatePrograms/TPkgShopAffiliate_TradeDoubler.class.php#L20-L73 |
31,481 | symbiote/silverstripe-cdncontent | code/content/ContentDeliveryService.php | ContentDeliveryService.storeThemeFile | public function storeThemeFile($toCdn, $file, $forceUpdate = false, $processReferences = false) {
$mtime = @filemtime($file);
$relativeName = self::CDN_THEME_PREFIX . '/' . $mtime . '/' . trim(str_replace(Director::baseFolder(), '', $file), '/');
if (!$forceUpdate) {
// see if the file already exists, if no... | php | public function storeThemeFile($toCdn, $file, $forceUpdate = false, $processReferences = false) {
$mtime = @filemtime($file);
$relativeName = self::CDN_THEME_PREFIX . '/' . $mtime . '/' . trim(str_replace(Director::baseFolder(), '', $file), '/');
if (!$forceUpdate) {
// see if the file already exists, if no... | [
"public",
"function",
"storeThemeFile",
"(",
"$",
"toCdn",
",",
"$",
"file",
",",
"$",
"forceUpdate",
"=",
"false",
",",
"$",
"processReferences",
"=",
"false",
")",
"{",
"$",
"mtime",
"=",
"@",
"filemtime",
"(",
"$",
"file",
")",
";",
"$",
"relativeNa... | Store the contents of a folder on a CDN.
If processReferences is set, relative URL references are attempted to be
detected and stored remotely as well, with the file to be stored rewritten
to refer to the CDN value. This really is only useful for CSS
@param string $folder
@param boolean $processReferences | [
"Store",
"the",
"contents",
"of",
"a",
"folder",
"on",
"a",
"CDN",
"."
] | a5f82e802e9addaf98d506cf305a621b873a5c9b | https://github.com/symbiote/silverstripe-cdncontent/blob/a5f82e802e9addaf98d506cf305a621b873a5c9b/code/content/ContentDeliveryService.php#L58-L90 |
31,482 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchFieldWeight.class.php | TShopSearchFieldWeight.InsertSoundex | protected function InsertSoundex($iArticleId, $sOriginalWord, $iCount, $dOriginalWeight)
{
$sSoundEx = TdbShopSearchIndexer::GetSoundexForWord($sOriginalWord);
$sSoundEx = TdbShopSearchIndexer::PrepareSearchWord($sSoundEx); // clean and cut the word
if (!empty($sSoundEx) && '0000' != $sSoun... | php | protected function InsertSoundex($iArticleId, $sOriginalWord, $iCount, $dOriginalWeight)
{
$sSoundEx = TdbShopSearchIndexer::GetSoundexForWord($sOriginalWord);
$sSoundEx = TdbShopSearchIndexer::PrepareSearchWord($sSoundEx); // clean and cut the word
if (!empty($sSoundEx) && '0000' != $sSoun... | [
"protected",
"function",
"InsertSoundex",
"(",
"$",
"iArticleId",
",",
"$",
"sOriginalWord",
",",
"$",
"iCount",
",",
"$",
"dOriginalWeight",
")",
"{",
"$",
"sSoundEx",
"=",
"TdbShopSearchIndexer",
"::",
"GetSoundexForWord",
"(",
"$",
"sOriginalWord",
")",
";",
... | insert soundex for word.
@param string $sOriginalWord
@param float $dOriginalWeight | [
"insert",
"soundex",
"for",
"word",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchFieldWeight.class.php#L221-L233 |
31,483 | chameleon-system/chameleon-shop | src/ShopBundle/objects/WebModules/MTShopArticleQuestionEndPoint.class.php | MTShopArticleQuestionEndPoint.isAntiSpamFieldValid | protected function isAntiSpamFieldValid()
{
$bCodeIsValid = false;
$oCaptcha = TdbPkgCmsCaptcha::GetInstanceFromName('text-field-javascript-hidden');
if ($oCaptcha->CodeIsValid('question', '')) {
$bCodeIsValid = true;
}
return $bCodeIsValid;
} | php | protected function isAntiSpamFieldValid()
{
$bCodeIsValid = false;
$oCaptcha = TdbPkgCmsCaptcha::GetInstanceFromName('text-field-javascript-hidden');
if ($oCaptcha->CodeIsValid('question', '')) {
$bCodeIsValid = true;
}
return $bCodeIsValid;
} | [
"protected",
"function",
"isAntiSpamFieldValid",
"(",
")",
"{",
"$",
"bCodeIsValid",
"=",
"false",
";",
"$",
"oCaptcha",
"=",
"TdbPkgCmsCaptcha",
"::",
"GetInstanceFromName",
"(",
"'text-field-javascript-hidden'",
")",
";",
"if",
"(",
"$",
"oCaptcha",
"->",
"CodeI... | checks the anti spam field.
@return bool | [
"checks",
"the",
"anti",
"spam",
"field",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopArticleQuestionEndPoint.class.php#L100-L109 |
31,484 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentMethodList.class.php | TShopPaymentMethodList.& | public static function &GetAvailableMethods($iGroupId)
{
$query = self::getAvailableMethodsQuery($iGroupId);
$oList = &TdbShopPaymentMethodList::GetList($query);
$oList->bAllowItemCache = true;
$oList->RemoveInvalidItems();
return $oList;
} | php | public static function &GetAvailableMethods($iGroupId)
{
$query = self::getAvailableMethodsQuery($iGroupId);
$oList = &TdbShopPaymentMethodList::GetList($query);
$oList->bAllowItemCache = true;
$oList->RemoveInvalidItems();
return $oList;
} | [
"public",
"static",
"function",
"&",
"GetAvailableMethods",
"(",
"$",
"iGroupId",
")",
"{",
"$",
"query",
"=",
"self",
"::",
"getAvailableMethodsQuery",
"(",
"$",
"iGroupId",
")",
";",
"$",
"oList",
"=",
"&",
"TdbShopPaymentMethodList",
"::",
"GetList",
"(",
... | return list of shipping types that match the given group, the current basket,
the current portal and the current user.
@param int $iGroupId
@return TdbShopPaymentMethodList | [
"return",
"list",
"of",
"shipping",
"types",
"that",
"match",
"the",
"given",
"group",
"the",
"current",
"basket",
"the",
"current",
"portal",
"and",
"the",
"current",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentMethodList.class.php#L26-L34 |
31,485 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentMethodList.class.php | TShopPaymentMethodList.& | public static function &GetPublicPaymentMethods($iGroupId)
{
$query = self::getAvailableMethodsQuery($iGroupId);
$oList = &TdbShopPaymentMethodList::GetList($query);
$oList->bAllowItemCache = true;
$oList->RemoveRestrictedItems();
return $oList;
} | php | public static function &GetPublicPaymentMethods($iGroupId)
{
$query = self::getAvailableMethodsQuery($iGroupId);
$oList = &TdbShopPaymentMethodList::GetList($query);
$oList->bAllowItemCache = true;
$oList->RemoveRestrictedItems();
return $oList;
} | [
"public",
"static",
"function",
"&",
"GetPublicPaymentMethods",
"(",
"$",
"iGroupId",
")",
"{",
"$",
"query",
"=",
"self",
"::",
"getAvailableMethodsQuery",
"(",
"$",
"iGroupId",
")",
";",
"$",
"oList",
"=",
"&",
"TdbShopPaymentMethodList",
"::",
"GetList",
"(... | return all public payment methods for a given shipping group.
@param int $iGroupId
@return TdbShopPaymentMethodList | [
"return",
"all",
"public",
"payment",
"methods",
"for",
"a",
"given",
"shipping",
"group",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentMethodList.class.php#L94-L103 |
31,486 | chameleon-system/chameleon-shop | src/ShopRatingServiceBundle/objects/TPkgShopRatingService_EkomiEndPoint.class.php | TPkgShopRatingService_EkomiEndPoint.FetchCSVFile | protected function FetchCSVFile()
{
$bFileWritten = false;
$sCSVData = file_get_contents($this->fieldRatingUrl);
if (!empty($sCSVData)) {
if (false !== file_put_contents($this->sCsvFilePath, $sCSVData)) {
$bFileWritten = true;
} else {
... | php | protected function FetchCSVFile()
{
$bFileWritten = false;
$sCSVData = file_get_contents($this->fieldRatingUrl);
if (!empty($sCSVData)) {
if (false !== file_put_contents($this->sCsvFilePath, $sCSVData)) {
$bFileWritten = true;
} else {
... | [
"protected",
"function",
"FetchCSVFile",
"(",
")",
"{",
"$",
"bFileWritten",
"=",
"false",
";",
"$",
"sCSVData",
"=",
"file_get_contents",
"(",
"$",
"this",
"->",
"fieldRatingUrl",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"sCSVData",
")",
")",
"{",
... | Fetches the csv data from the api and saves it to the rating cache.
@return bool | [
"Fetches",
"the",
"csv",
"data",
"from",
"the",
"api",
"and",
"saves",
"it",
"to",
"the",
"rating",
"cache",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopRatingServiceBundle/objects/TPkgShopRatingService_EkomiEndPoint.class.php#L92-L109 |
31,487 | chameleon-system/chameleon-shop | src/ShopPaymentIPNBundle/objects/TPkgShopPaymentIPNManager.class.php | TPkgShopPaymentIPNManager.getIPNIdentifierFromOrder | private function getIPNIdentifierFromOrder(TdbShopOrder $oOrder)
{
$sIdentifier = null;
$query = "SELECT `shop_payment_handler_group`.*
FROM `shop_payment_handler_group`
INNER JOIN `shop_payment_handler` on `shop_payment_handler_group`.`id` = `shop_payment_handler`.... | php | private function getIPNIdentifierFromOrder(TdbShopOrder $oOrder)
{
$sIdentifier = null;
$query = "SELECT `shop_payment_handler_group`.*
FROM `shop_payment_handler_group`
INNER JOIN `shop_payment_handler` on `shop_payment_handler_group`.`id` = `shop_payment_handler`.... | [
"private",
"function",
"getIPNIdentifierFromOrder",
"(",
"TdbShopOrder",
"$",
"oOrder",
")",
"{",
"$",
"sIdentifier",
"=",
"null",
";",
"$",
"query",
"=",
"\"SELECT `shop_payment_handler_group`.*\n FROM `shop_payment_handler_group`\n INNER JOIN `shop... | return the IPNIdentifier for an order passed.
@param TdbShopOrder $oOrder
@return string|null | [
"return",
"the",
"IPNIdentifier",
"for",
"an",
"order",
"passed",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopPaymentIPNBundle/objects/TPkgShopPaymentIPNManager.class.php#L52-L70 |
31,488 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/Message.php | Message.getMandatoryField | public function getMandatoryField($fieldName)
{
$value = $this->getField($fieldName);
if (is_null($value)) {
throw new OffAmazonPaymentsNotifications_InvalidMessageException(
"Error with json message - mandatory field " . $fieldName .
" cannot be found"
... | php | public function getMandatoryField($fieldName)
{
$value = $this->getField($fieldName);
if (is_null($value)) {
throw new OffAmazonPaymentsNotifications_InvalidMessageException(
"Error with json message - mandatory field " . $fieldName .
" cannot be found"
... | [
"public",
"function",
"getMandatoryField",
"(",
"$",
"fieldName",
")",
"{",
"$",
"value",
"=",
"$",
"this",
"->",
"getField",
"(",
"$",
"fieldName",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"value",
")",
")",
"{",
"throw",
"new",
"OffAmazonPaymentsNotif... | Extract the mandatory field from the message and return the contents
@param string $fieldName name of the field to extract
@throws OffAmazonPaymentsNotifications_InvalidMessageException if not found
@return string field contents if found | [
"Extract",
"the",
"mandatory",
"field",
"from",
"the",
"message",
"and",
"return",
"the",
"contents"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/Message.php#L100-L110 |
31,489 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/Message.php | Message.getField | public function getField($fieldName)
{
if (array_key_exists($fieldName, $this->_message)) {
return $this->_message[$fieldName];
} else {
return null;
}
} | php | public function getField($fieldName)
{
if (array_key_exists($fieldName, $this->_message)) {
return $this->_message[$fieldName];
} else {
return null;
}
} | [
"public",
"function",
"getField",
"(",
"$",
"fieldName",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"$",
"fieldName",
",",
"$",
"this",
"->",
"_message",
")",
")",
"{",
"return",
"$",
"this",
"->",
"_message",
"[",
"$",
"fieldName",
"]",
";",
"}",
... | Extract the field if present, return null if not defined
@param string $fieldName name of the field to extract
@return string field contents if found, null otherwise | [
"Extract",
"the",
"field",
"if",
"present",
"return",
"null",
"if",
"not",
"defined"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/Message.php#L119-L126 |
31,490 | chameleon-system/chameleon-shop | src/ShopBundle/objects/WebModules/MTShopPageMetaCore/MTShopPageMetaCore.class.php | MTShopPageMetaCore.GetSeoPatternString | protected function GetSeoPatternString($dont_replace = false)
{
//return ''; //why? //#7767
$sPattern = ''; //"[{PORTAL_NAME}] - [{PAGE_NAME}]";
/** @var $oSeoRenderer TCMSRenderSeoPattern */
$oSeoRenderer = new TCMSRenderSeoPattern();
$sTmpPattern = parent::GetSeoPatternStr... | php | protected function GetSeoPatternString($dont_replace = false)
{
//return ''; //why? //#7767
$sPattern = ''; //"[{PORTAL_NAME}] - [{PAGE_NAME}]";
/** @var $oSeoRenderer TCMSRenderSeoPattern */
$oSeoRenderer = new TCMSRenderSeoPattern();
$sTmpPattern = parent::GetSeoPatternStr... | [
"protected",
"function",
"GetSeoPatternString",
"(",
"$",
"dont_replace",
"=",
"false",
")",
"{",
"//return ''; //why? //#7767",
"$",
"sPattern",
"=",
"''",
";",
"//\"[{PORTAL_NAME}] - [{PAGE_NAME}]\";",
"/** @var $oSeoRenderer TCMSRenderSeoPattern */",
"$",
"oSeoRenderer",
"... | Get SEO pattern string.
@param bool $dont_replace Do not replace pattern with values
@return string | [
"Get",
"SEO",
"pattern",
"string",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopPageMetaCore/MTShopPageMetaCore.class.php#L175-L204 |
31,491 | chameleon-system/chameleon-shop | src/ShopBundle/objects/WebModules/MTShopPageMetaCore/MTShopPageMetaCore.class.php | MTShopPageMetaCore.GetMetaCanonical | protected function GetMetaCanonical()
{
$sCanonical = '';
$shopService = $this->getShopService();
$oShopItem = $shopService->getActiveProduct();
/** @var $oShopItem TdbShopArticle */
if ($oShopItem) {
$oCat = $oShopItem->GetPrimaryCategory();
$iCat = '... | php | protected function GetMetaCanonical()
{
$sCanonical = '';
$shopService = $this->getShopService();
$oShopItem = $shopService->getActiveProduct();
/** @var $oShopItem TdbShopArticle */
if ($oShopItem) {
$oCat = $oShopItem->GetPrimaryCategory();
$iCat = '... | [
"protected",
"function",
"GetMetaCanonical",
"(",
")",
"{",
"$",
"sCanonical",
"=",
"''",
";",
"$",
"shopService",
"=",
"$",
"this",
"->",
"getShopService",
"(",
")",
";",
"$",
"oShopItem",
"=",
"$",
"shopService",
"->",
"getActiveProduct",
"(",
")",
";",
... | return the canonical URL for the page.
@return string | [
"return",
"the",
"canonical",
"URL",
"for",
"the",
"page",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopPageMetaCore/MTShopPageMetaCore.class.php#L211-L240 |
31,492 | chameleon-system/chameleon-shop | src/ShopListFilterBundle/objects/db/ListfilterItems/TPkgShopListfilterItemVariant.class.php | TPkgShopListfilterItemVariant.GetVariantType | protected function GetVariantType($aRow)
{
$sKey = 'oVariantType_'.$aRow['shop_variant_set_id'];
$oVariantType = &$this->GetFromInternalCache($sKey);
if (null === $oVariantType) {
$oVariantType = TdbShopVariantType::GetNewInstance();
if (!empty($aRow['shop_variant_set... | php | protected function GetVariantType($aRow)
{
$sKey = 'oVariantType_'.$aRow['shop_variant_set_id'];
$oVariantType = &$this->GetFromInternalCache($sKey);
if (null === $oVariantType) {
$oVariantType = TdbShopVariantType::GetNewInstance();
if (!empty($aRow['shop_variant_set... | [
"protected",
"function",
"GetVariantType",
"(",
"$",
"aRow",
")",
"{",
"$",
"sKey",
"=",
"'oVariantType_'",
".",
"$",
"aRow",
"[",
"'shop_variant_set_id'",
"]",
";",
"$",
"oVariantType",
"=",
"&",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"$",
"sKey",
... | return the variant type matching "color".
@param array $aRow - the data of the current article
@return TdbShopVariantType | [
"return",
"the",
"variant",
"type",
"matching",
"color",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopListFilterBundle/objects/db/ListfilterItems/TPkgShopListfilterItemVariant.class.php#L41-L58 |
31,493 | chameleon-system/chameleon-shop | src/ShopListFilterBundle/objects/db/ListfilterItems/TPkgShopListfilterItemVariant.class.php | TPkgShopListfilterItemVariant.GetItemName | public function GetItemName($sFieldName, $sFieldValue, $aRow)
{
static $aLookupList = array();
if (!array_key_exists($aRow['id'], $aLookupList)) {
$aLookupList[$aRow['id']] = array();
$oVariantType = $this->GetVariantType($aRow);
if ($oVariantType) {
... | php | public function GetItemName($sFieldName, $sFieldValue, $aRow)
{
static $aLookupList = array();
if (!array_key_exists($aRow['id'], $aLookupList)) {
$aLookupList[$aRow['id']] = array();
$oVariantType = $this->GetVariantType($aRow);
if ($oVariantType) {
... | [
"public",
"function",
"GetItemName",
"(",
"$",
"sFieldName",
",",
"$",
"sFieldValue",
",",
"$",
"aRow",
")",
"{",
"static",
"$",
"aLookupList",
"=",
"array",
"(",
")",
";",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"aRow",
"[",
"'id'",
"]",
",",
... | return the item name for a given ID.
@param string $sFieldName
@param string $sFieldValue
@param array $aRow
@return string | [
"return",
"the",
"item",
"name",
"for",
"a",
"given",
"ID",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopListFilterBundle/objects/db/ListfilterItems/TPkgShopListfilterItemVariant.class.php#L101-L128 |
31,494 | comporu/compo-core | src/Compo/ImportBundle/Controller/DefaultController.php | DefaultController.getLetterArray | private function getLetterArray()
{
$array = range('A', 'Z');
$letters = $array;
foreach ($array as $first) {
foreach ($array as $second) {
$letters[] = $first . $second;
}
}
return $letters;
} | php | private function getLetterArray()
{
$array = range('A', 'Z');
$letters = $array;
foreach ($array as $first) {
foreach ($array as $second) {
$letters[] = $first . $second;
}
}
return $letters;
} | [
"private",
"function",
"getLetterArray",
"(",
")",
"{",
"$",
"array",
"=",
"range",
"(",
"'A'",
",",
"'Z'",
")",
";",
"$",
"letters",
"=",
"$",
"array",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"first",
")",
"{",
"foreach",
"(",
"$",
"array",
... | get array from A to ZZ.
@return array | [
"get",
"array",
"from",
"A",
"to",
"ZZ",
"."
] | ebaa9fe8a4b831506c78fdf637da6b4deadec1e2 | https://github.com/comporu/compo-core/blob/ebaa9fe8a4b831506c78fdf637da6b4deadec1e2/src/Compo/ImportBundle/Controller/DefaultController.php#L114-L125 |
31,495 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerSofortueberweisung.class.php | TShopPaymentHandlerSofortueberweisung.GetResponseURL | protected function GetResponseURL($sResponse)
{
$sReturnURLBase = $this->getActivePageService()->getActivePage()->GetRealURLPlain(array(), true);
if ('.html' === substr($sReturnURLBase, -5)) {
$sReturnURLBase = substr($sReturnURLBase, 0, -5);
}
if ('/' !== substr($sReturn... | php | protected function GetResponseURL($sResponse)
{
$sReturnURLBase = $this->getActivePageService()->getActivePage()->GetRealURLPlain(array(), true);
if ('.html' === substr($sReturnURLBase, -5)) {
$sReturnURLBase = substr($sReturnURLBase, 0, -5);
}
if ('/' !== substr($sReturn... | [
"protected",
"function",
"GetResponseURL",
"(",
"$",
"sResponse",
")",
"{",
"$",
"sReturnURLBase",
"=",
"$",
"this",
"->",
"getActivePageService",
"(",
")",
"->",
"getActivePage",
"(",
")",
"->",
"GetRealURLPlain",
"(",
"array",
"(",
")",
",",
"true",
")",
... | return SEO URL for the requested response.
@param $sResponseName string | [
"return",
"SEO",
"URL",
"for",
"the",
"requested",
"response",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerSofortueberweisung.class.php#L131-L145 |
31,496 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerSofortueberweisung.class.php | TShopPaymentHandlerSofortueberweisung.BuildIncomingHash | protected function BuildIncomingHash($aParameter)
{
$sHash = '';
$aBaseData = array();
if (false == $this->UsesAccountFromSofortBank()) {
$aBaseData = array('transaction' => '', 'user_id' => '', 'project_id' => '', 'sender_holder' => '', 'sender_account_number' => '', 'sender_ban... | php | protected function BuildIncomingHash($aParameter)
{
$sHash = '';
$aBaseData = array();
if (false == $this->UsesAccountFromSofortBank()) {
$aBaseData = array('transaction' => '', 'user_id' => '', 'project_id' => '', 'sender_holder' => '', 'sender_account_number' => '', 'sender_ban... | [
"protected",
"function",
"BuildIncomingHash",
"(",
"$",
"aParameter",
")",
"{",
"$",
"sHash",
"=",
"''",
";",
"$",
"aBaseData",
"=",
"array",
"(",
")",
";",
"if",
"(",
"false",
"==",
"$",
"this",
"->",
"UsesAccountFromSofortBank",
"(",
")",
")",
"{",
"... | build incoming hash string from data provided by sofortueberweisung.
@param array $aParameter
@return string | [
"build",
"incoming",
"hash",
"string",
"from",
"data",
"provided",
"by",
"sofortueberweisung",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerSofortueberweisung.class.php#L327-L348 |
31,497 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerSofortueberweisung.class.php | TShopPaymentHandlerSofortueberweisung.NotifyPayloadIsValid | protected function NotifyPayloadIsValid($aParameter)
{
$bIsValid = true;
$aMessage = array('msg' => '', 'line' => 0);
// validate hash
$sCalculatedHash = $this->BuildIncomingHash($aParameter);
$sHash = (array_key_exists('hash', $aParameter)) ? $aParameter['hash'] : '';
... | php | protected function NotifyPayloadIsValid($aParameter)
{
$bIsValid = true;
$aMessage = array('msg' => '', 'line' => 0);
// validate hash
$sCalculatedHash = $this->BuildIncomingHash($aParameter);
$sHash = (array_key_exists('hash', $aParameter)) ? $aParameter['hash'] : '';
... | [
"protected",
"function",
"NotifyPayloadIsValid",
"(",
"$",
"aParameter",
")",
"{",
"$",
"bIsValid",
"=",
"true",
";",
"$",
"aMessage",
"=",
"array",
"(",
"'msg'",
"=>",
"''",
",",
"'line'",
"=>",
"0",
")",
";",
"// validate hash",
"$",
"sCalculatedHash",
"... | validate input. return true if valid, or error string on error.
@param array $aParameter
@return bool | [
"validate",
"input",
".",
"return",
"true",
"if",
"valid",
"or",
"error",
"string",
"on",
"error",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerSofortueberweisung.class.php#L442-L482 |
31,498 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExampleCLI.php | RefundExampleCLI._getRefundAmount | private function _getRefundAmount()
{
print PHP_EOL . "----------------------------------------------------------------------------" . PHP_EOL;
print "Enter the amount to refund the customer (to 2 decimal places): ";
do {
$refundAmount = trim(fgets(STDIN));
} whi... | php | private function _getRefundAmount()
{
print PHP_EOL . "----------------------------------------------------------------------------" . PHP_EOL;
print "Enter the amount to refund the customer (to 2 decimal places): ";
do {
$refundAmount = trim(fgets(STDIN));
} whi... | [
"private",
"function",
"_getRefundAmount",
"(",
")",
"{",
"print",
"PHP_EOL",
".",
"\"----------------------------------------------------------------------------\"",
".",
"PHP_EOL",
";",
"print",
"\"Enter the amount to refund the customer (to 2 decimal places): \"",
";",
"do",
"{"... | Get the amount to refund
@return string refund amount, as a numeric string` | [
"Get",
"the",
"amount",
"to",
"refund"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExampleCLI.php#L116-L126 |
31,499 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExampleCLI.php | RefundExampleCLI._waitUntilRefundProcessingIsCompleted | private function _waitUntilRefundProcessingIsCompleted($amazonRefundReferenceId)
{
$response = $this->callStepAndCheckForException(
'waitUntilRefundProcessingIsCompleted',
array($amazonRefundReferenceId)
);
printGetRefundDetailsResponse($response);
val... | php | private function _waitUntilRefundProcessingIsCompleted($amazonRefundReferenceId)
{
$response = $this->callStepAndCheckForException(
'waitUntilRefundProcessingIsCompleted',
array($amazonRefundReferenceId)
);
printGetRefundDetailsResponse($response);
val... | [
"private",
"function",
"_waitUntilRefundProcessingIsCompleted",
"(",
"$",
"amazonRefundReferenceId",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"callStepAndCheckForException",
"(",
"'waitUntilRefundProcessingIsCompleted'",
",",
"array",
"(",
"$",
"amazonRefundRefere... | Poll the API for the status of the Refund Request, and continue
once the status has been updated
Throw an error if the status is not equal to OPEN
@param string $amazonRefundReferenceId refund transaction to query
@return No value | [
"Poll",
"the",
"API",
"for",
"the",
"status",
"of",
"the",
"Refund",
"Request",
"and",
"continue",
"once",
"the",
"status",
"has",
"been",
"updated",
"Throw",
"an",
"error",
"if",
"the",
"status",
"is",
"not",
"equal",
"to",
"OPEN"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/RefundExampleCLI.php#L169-L178 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.