예제 #1
0
 public function getBlockCustomStyleRule()
 {
     $db = Loader::db();
     $csrID = $this->csrID;
     if ($csrID > 0) {
         Loader::model('custom_style');
         $txt = Loader::helper('text');
         $csr = CustomStyleRule::getByID($csrID);
         $arHandle = $txt->filterNonAlphaNum($this->getAreaHandle());
         if (is_object($csr)) {
             $csr->setCustomStyleNameSpace('blockStyle' . $this->getBlockID() . $arHandle);
             return $csr;
         }
     }
 }
예제 #2
0
	public function getAreaCustomStyleRule($area) {
		$db = Loader::db();
		
		$csrID = $this->vObj->customAreaStyles[$area->getAreaHandle()];
		
		if ($csrID > 0) {
			$txt = Loader::helper('text');
			Loader::model('custom_style');
			$arHandle = $txt->filterNonAlphaNum($area->getAreaHandle());			
			$csr = CustomStyleRule::getByID($csrID);
			if (is_object($csr)) {
				$csr->setCustomStyleNameSpace('areaStyle' . $arHandle);
				return $csr;
			}
		}
	}
예제 #3
0
 public function getCustomStylePresetRuleObject()
 {
     return CustomStyleRule::getByID($this->csrID);
 }
예제 #4
0
 public function getAreaCustomStyleRule($area)
 {
     $db = Loader::db();
     $areac = $area->getAreaCollectionObject();
     if ($areac instanceof Stack) {
         // this fixes the problem of users applying design to the main area on the page, and then that trickling into any
         // stacks that have been added to other areas of the page.
         return false;
     }
     $styles = $this->vObj->getCustomAreaStyles();
     $csrID = $styles[$area->getAreaHandle()];
     if ($csrID > 0) {
         $txt = Loader::helper('text');
         Loader::model('custom_style');
         $arHandle = $txt->filterNonAlphaNum($area->getAreaHandle());
         $csr = CustomStyleRule::getByID($csrID);
         if (is_object($csr)) {
             $csr->setCustomStyleNameSpace('areaStyle' . $arHandle);
             return $csr;
         }
     }
 }