Buduje pole
@return string
2942
public function fetchField()
    {
        //wartości pola
        $values = is_array($this->getValue()) ? $this->getValue() : [$this->getValue()];
        $html = '<ul id="' . ($baseId = $this->getId()) . '-list">';
        //filtr url
        $f = new \Mmi\Filter\Url;
        foreach ($this->getMultioptions() as $key => $caption) {
            //nowy checkbox
            $checkbox = new Checkbox($this->getBaseName() . '[]');
            //konfiguracja checkboxa
            $checkbox->setLabel($caption)
                ->setForm($this->_form)
                ->setValue($key)
                ->setId($baseId . '-' . $f->filter($key))
                ->setRenderingOrder(['fetchField', 'fetchLabel']);
            //zaznaczenia wartości
            if (in_array($key, $values)) {
                $checkbox->setChecked();
            }
            //wartość wyłączona
            if (strpos($key, ':disabled') !== false) {
                $checkbox->setValue('')
                    ->setDisabled();
            }
            $html .= '<li ' . ($checkbox->getDisabled() ? 'class="disabled" ' : '') . 'id="' . $checkbox->getId() . '-item' . '">' .
                $checkbox . '</li>';
        }
        return $html . '</ul>';
    }
964130
public function getTagRelations()
    {
        //pobranie relacji
        return (new CmsTagRelationQuery)
                ->join('cms_tag')->on('cms_tag_id')
                ->whereObject()->equals($this->_object)
                ->andFieldObjectId()->equals($this->_objectId)
                ->findPairs('cms_tag.id', 'cms_tag.tag');
    }
1305512
public function sortAction()
    {
        $this->getResponse()->setTypePlain();
        if (!$this->getPost()->__get('item-file')) {
            return $this->view->getTranslate()->_('Przenoszenie nie powiodło się');
        }
        \Cms\Model\File::sortBySerial($this->getPost()->__get('item-file'));
        return '';
    }
975724
public function toUrl()
    {
        $post_data = $this->toPostData();
        $out = $this->getNormalizedHttpUrl();
        if ($post_data) {
            $out .= '?'.$post_data;
        }
        return $out;
    }
254640
public static function getLevel()
    {
        if (!self::$_config) {
            throw new LoggerException('Configuration not loaded');
        }
        $minLevel = Logger::EMERGENCY;
        //iteracja po configach
        foreach (self::$_config as $config) {
            if ($config->getLevel() < $minLevel) {
                $minLevel = $config->getLevel();
            }
        }
        return $minLevel;
    }
362004
public function pluploadAction()
    {
        set_time_limit(5 * 60);
        //obiekt handlera plupload
        $pluploadHandler = new Model\PluploadHandler();
        //jeśli wystąpił błąd
        if (!$pluploadHandler->handle()) {
            return $this->_jsonError($pluploadHandler->getErrorCode(), $pluploadHandler->getErrorMessage());
        }
        //jeśli wykonać operację po przesłaniu całego pliku i zapisaniu rekordu
        if ($this->getPost()->afterUpload && null !== $record = $pluploadHandler->getSavedCmsFileRecord()) {
            $this->_operationAfter($this->getPost()->afterUpload, $record);
        }
        return json_encode(['result' => 'OK', 'cmsFileId' => $pluploadHandler->getSavedCmsFileId()]);
    }
1346766
public function toString() {
		$txt = $this->getName ();
		$txt .= $this->getPesel ();
		$txt .= "id:";
		$txt .= $this->getId ();
		$txt .= "oid:";
		$txt .= $this->getOddzialId ();
		$txt .= "d:";
		$data = $this->getDataKategoryzacji ();
		if ($data instanceof \DateTime) {
			$txt .= $this->getDataKategoryzacji ()->format ( "Y-m-d" );
		} else {
			$txt .= $this->getDataKategoryzacji ();
		}
		return $txt;
	}
1215459
public function getInfo()
    {
        if (function_exists('apache_note')) {
            $serverDesc = 'Apache';
        } else {
            $serverDesc = Piwik::translate('UserCountry_HttpServerModule');
        }

        $title = sprintf(self::TITLE, $serverDesc);
        $desc = Piwik::translate('UserCountry_GeoIpLocationProviderDesc_ServerBased1', array('<strong>', '</strong>'))
            . '<br/><br/>'
             . Piwik::translate('UserCountry_GeoIpLocationProviderDesc_ServerBasedAnonWarn')
            . '<br/><br/>'
            . Piwik::translate('UserCountry_GeoIpLocationProviderDesc_ServerBased2',
                array('<strong>', '</strong>', '<strong>', '</strong>'));
        $installDocs =
            '<a rel="noreferrer noopener"  target="_blank" href="https://matomo.org/faq/how-to/#faq_165">'
            . Piwik::translate('UserCountry_HowToInstallApacheModule')
            . '</a><br/>'
            . '<a rel="noreferrer noopener"  target="_blank" href="https://matomo.org/faq/how-to/#faq_166">'
            . Piwik::translate('UserCountry_HowToInstallNginxModule')
            . '</a>';

        $geoipServerVars = array();
        foreach ($_SERVER as $key => $value) {
            if (strpos($key, 'GEOIP') === 0) {
                $geoipServerVars[] = $key;
            }
        }

        if (empty($geoipServerVars)) {
            $extraMessage = '<strong>' . Piwik::translate('UserCountry_GeoIPNoServerVars', '$_SERVER') . '</strong>';
        } else {
            $extraMessage = '<strong>' . Piwik::translate('UserCountry_GeoIPServerVarsFound', '$_SERVER')
                . ":</strong><br/><br/>\n<ul style=\"list-style:disc;margin-left:24px\">\n";
            foreach ($geoipServerVars as $key) {
                $extraMessage .= '<li>' . $key . "</li>\n";
            }
            $extraMessage .= '</ul>';
        }

        return array('id'            => self::ID,
                     'title'         => $title,
                     'description'   => $desc,
                     'order'         => 14,
                     'install_docs'  => $installDocs,
                     'extra_message' => $extraMessage);
    }
202899
public function fetchField()
    {
        //labelka jako value
        if ($this->getLabel()) {
            $this->setValue($this->getLabel());
        }
        //opcje do widoku
        \Mmi\App\FrontController::getInstance()->getView()->_htmlOptions = $this->_getHtmlOptions();
        //render szablonu
        return \Mmi\App\FrontController::getInstance()->getView()->renderTemplate(static::TEMPLATE_FIELD);
    }
772714
public function get()
    {
        $elapsed = $this->elapsed();
        //iteracja po danych
        foreach ($this->_data as $key => $item) {
            if ($elapsed == 0) {
                $this->_data[$key]['percent'] = 0;
                continue;
            }
            $this->_data[$key]['percent'] = 100 * $item['elapsed'] / $elapsed;
        }
        return $this->_data;
    }
281384
public function moveAction()
    {
        $this->getResponse()->setTypeJson();
        //brak kategorii
        if (null === $masterCategory = (new \Cms\Orm\CmsCategoryQuery)->findPk($this->getPost()->id)) {
            return json_encode(['status' => false, 'error' => $this->view->_('controller.category.move.error.missing')]);
        }
        //domyślnie nie ma drafta - alias
        $draft = $masterCategory;
        //zmiana parenta tworzy draft
        if ($this->getPost()->parentId != $masterCategory->parentId) {
            //tworzenie draftu
            $draft = (new \Cms\Model\CategoryDraft($masterCategory))->createAndGetDraftForUser(\App\Registry::$auth->getId(), true);
        }
        //zapis kolejności
        $draft->parentId = ($this->getPost()->parentId > 0) ? $this->getPost()->parentId : null;
        $draft->order = $this->getPost()->order;
        //próba zapisu
        return ($draft->save() && $draft->commitVersion()) ? json_encode(['status' => true, 'id' => $masterCategory->id, 'message' => $this->view->_('controller.category.move.message')]) : json_encode(['status' => false, 'error' => $this->view->_('controller.category.move.error')]);
    }
1238932
public function getHeight()
    {
        //jeśli podana explicit
        if (isset($this->_exif['ExifImageLength'])) {
            return round($this->_exif['ExifImageLength']);
        }
        //obliczenia z COMPUTED
        return isset($this->_exif['COMPUTED']['Height']) ? round($this->_exif['COMPUTED']['Height']) : null;
    }
267821
public final function fetchBegin()
    {
        $class = get_class($this);
        //dodawanie klasy z klasą forma
        $this->addClass(strtolower(substr($class, strrpos($class, '\\') + 1)));
        //dodawanie klasy błędu jeśli wystąpiły
        if ($this->getErrors()) {
            $this->addClass('error');
        }
        //element do widoku
        \Mmi\App\FrontController::getInstance()->getView()->_element = $this;
        //render szablonu
        return \Mmi\App\FrontController::getInstance()->getView()->renderTemplate(static::TEMPLATE_BEGIN);
    }
695185
function getPolylineJS() {
        $_output = '';
        foreach($this->_polylines as $polyline_id =>$_polyline) {
        	$_coords_output = "";
        	foreach($_polyline["coords"] as $_coords){
				if($_coords_output != ""){$_coords_output.=",";}
        		$_coords_output .= "
        		    new google.maps.LatLng(".$_coords["lat"].", ".$_coords["long"].")
        		";
        	}
        	$_output .= "
        	   polylineCoords".$this->map_id."[$polyline_id] = [".$_coords_output."];    	
			   polylines".$this->map_id."[$polyline_id] = new google.maps.Polyline({
				  path: polylineCoords".$this->map_id."[$polyline_id]
				  ".(($_polyline['color']!="")?", strokeColor: '".$_polyline['color']."'":"")."
				  ".(($_polyline['opacity']!=0)?", strokeOpacity: ".$_polyline['opacity']."":"")."
				  ".(($_polyline['weight']!=0)?", strokeWeight: ".$_polyline['weight']."":"")."
			  });			
			  polylines".$this->map_id."[$polyline_id].setMap(map".$this->map_id.");
        	";
			
			//Elevation profiles
			if(!empty($this->_elevation_polylines) && isset($this->_elevation_polylines[$polyline_id])){
				$elevation_dom_id=$this->_elevation_polylines[$polyline_id]["dom_id"];
				$width = $this->_elevation_polylines[$polyline_id]["width"];
				$height = $this->_elevation_polylines[$polyline_id]["height"];
				$samples = $this->_elevation_polylines[$polyline_id]["samples"];
				$focus_color = $this->_elevation_polylines[$polyline_id]["focus_color"];
				$_output .= "
					elevationPolylines".$this->map_id."[$polyline_id] = {
						'selector':'$elevation_dom_id',
						'chart': new google.visualization.ColumnChart(document.getElementById('$elevation_dom_id')),
						'service': new google.maps.ElevationService(),
						'width':$width,
						'height':$height,
						'focusColor':'$focus_color',
						'marker':null
					};
					elevationPolylines".$this->map_id."[$polyline_id]['service'].getElevationAlongPath({
						path: polylineCoords".$this->map_id."[$polyline_id],
						samples: $samples
					}, function(results,status){plotElevation(results,status, elevationPolylines".$this->map_id."[$polyline_id], map".$this->map_id.", elevationCharts".$this->map_id.");});
				";
			}
		}
        return $_output;
    }
486603
protected function getCurrentPort()
    {
        // Сначала проверьте наличие прокси-сервера
        $port = $this->getHeader('X_FORWARDED_PORT');
        if ($port) {
            return (string)$port;
        }

        $protocol = (string)$this->getHeader('X_FORWARDED_PROTO');
        if ($protocol === 'https') {
            return '443';
        }

        return (string)$this->getServerVar('SERVER_PORT');
    }
1057314
public function thumbnailAction()
    {
        if (!$this->getPost()->cmsFileId) {
            return $this->_jsonError(179);
        }
        //szukamy rekordu pliku
        if (null !== $record = (new CmsFileQuery)->findPk($this->getPost()->cmsFileId)) {
            //sprawdzenie czy obrazek
            if ($record->class === 'image') {
                try {
                    $thumb = new \Cms\Mvc\ViewHelper\Thumb();
                    $url = $thumb->thumb($record, 'scaley', '60');
                    if (!empty($url)) {
                        return json_encode(['result' => 'OK', 'url' => $url]);
                    }
                } catch (\Exception $ex) {
                    
                }
            }
        }
        return $this->_jsonError(179);
    }
733600
public function getRealPath()
    {
        //brak prawidłowej nazwy pliku
        if (strlen($this->_name) < 4) {
            return;
        }
        //ścieżka na dysku
        return BASE_PATH . '/var/data/' . $this->_name[0] . '/' . $this->_name[1] . '/' . $this->_name[2] . '/' . $this->_name[3] . '/' . $this->_name;
    }