本文整理匯總了PHP中css::deleteBlockSelectors方法的典型用法代碼示例。如果您正苦於以下問題:PHP css::deleteBlockSelectors方法的具體用法?PHP css::deleteBlockSelectors怎麽用?PHP css::deleteBlockSelectors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類css
的用法示例。
在下文中一共展示了css::deleteBlockSelectors方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: removeBlockAction
/**
* Remove block
* @param string $typeProgress
* @param string $parentBlock
* @param string $idBlock
* @return string
*/
protected function removeBlockAction($typeProgress, $parentBlock, $idBlock, $THEMEMODULE, $THEME)
{
$this->initObjects();
$parent = $this->{$typeProgress}->searchBlock($parentBlock);
$block = $this->{$typeProgress}->searchBlock($idBlock);
if (is_object($block) && method_exists($block, 'destruct')) {
$block->destruct();
}
$parent->rmBlock($idBlock);
$test = $this->{$typeProgress}->searchBlock($idBlock);
if ($test == NULL) {
$path = PROFILE_PATH . $THEMEMODULE . '/themes/' . $THEME . '/style.css';
if (is_file($path)) {
$css = new \css($path);
$css->deleteBlockSelectors('#' . $idBlock);
$css->save();
}
$this->saveAll();
$return = array('eval' => '$("#" + Parsimony.blocks["admin_blocks"].inProgress,ParsimonyAdmin.currentBody).remove();$("#changeres").trigger("change");', 'notification' => t('The block has been deleted'), 'notificationType' => 'positive');
} else {
$return = array('notification' => t('Container block cannot be deleted'), 'notificationType' => 'negative');
}
return $this->returnResult($return);
}