/** * (non-PHPdoc) * @see SMWResultPrinter::handleParameters() */ protected function handleParameters( array $params, $outputmode ) { parent::handleParameters( $params, $outputmode ); // init process graph instance $this->m_process = new ProcessGraph(); $this->m_process->setGraphName( trim( $params['graphname'] ) ); $this->m_process->setGraphSize( trim( $params['graphsize'] ) ); $this->m_process->setClusterColor( trim( $params['clustercolor'] ) ); $this->m_process->setRankdir( strtoupper( trim( $params['rankdir'] ) ) ); $this->m_process->setHighlightNode( trim( $params['highlight'] ) ); $this->m_process->setHighlightColor( trim( $params['highlightcolor'] ) ); $this->m_process->setHighlightColor( trim( $params['redlinkcolor'] ) ); $this->m_process->setShowRoles( $params['showroles'] ); $this->m_process->setShowStatus( $params['showstatus'] ); $this->m_process->setShowRessources( $params['showresources'] ); $this->m_process->setShowDiscussion( $params['showdiscussion'] ); $this->m_process->setShowRedLinks( $params['showredlinks'] ); $this->m_process->setShowCompound( $params['showcompound'] ); $this->m_processCategory = $params['processcat']; $this->m_isDebugSet = $params['debug']; $this->m_graphValidation = $params['graphvalidation']; }
/** * @see SMWResultPrinter::handleParameters * * @since 1.6.2 * * @param array $params * @param $outputmode */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->mUserParam = trim($params['userparam']); $this->mDelim = trim($params['delim']); $this->mNumColumns = $params['columns']; $this->mTemplate = $params['template']; }
/** * @see SMWResultPrinter::handleParameters * * @since 1.6 * * @param array $params * @param $outputmode */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); // Do not allow backspaces as delimiter, as they'll break stuff. if (trim($params['separator']) != '\\') { $this->separator = trim($params['separator']); } $this->fileName = str_replace(' ', '_', $params['filename']); }
/** * @see SMWResultPrinter::handleParameters * * @since 1.6.3 * * @param array $params * @param $outputmode */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->m_tlstart = smwfNormalTitleDBKey($params['timelinestart']); $this->m_tlend = smwfNormalTitleDBKey($params['timelineend']); $this->m_tlbands = $params['timelinebands']; $this->m_tlpos = strtolower(trim($params['timelineposition'])); // str_replace makes sure this is only one value, not mutliple CSS fields (prevent CSS attacks) // / FIXME: this is either unsafe or redundant, since Timeline is Wiki-compatible. If the JavaScript makes user inputs to CSS then it is bad even if we block this injection path. $this->m_tlsize = htmlspecialchars(str_replace(';', ' ', strtolower($params['timelinesize']))); }
/** * @see SMWResultPrinter::handleParameters * * @since 1.6 * * @param array $params * @param $outputmode */ protected function handleParameters( array $params, $outputmode ) { parent::handleParameters( $params, $outputmode ); $this->mSep = $this->isPlainlist() ? $params['sep'] : ''; $this->mTemplate = trim( $params['template'] ); $this->mNamedArgs = $params['named args']; $this->mUserParam = trim( $params['userparam'] ); $this->mColumns = !$this->isPlainlist() ? $params['columns'] : 1; $this->mIntroTemplate = $params['introtemplate']; $this->mOutroTemplate = $params['outrotemplate']; }
/** * @see SMWResultPrinter::handleParameters * * @since 1.6 * * @param array $params * @param $outputmode */ protected function handleParameters( array $params, $outputmode ) { parent::handleParameters( $params, $outputmode ); $this->includeName = $params['includesubject']; $this->sizeMode = $params['increase']; $this->tagOrder = $params['tagorder']; $this->minCount = $params['mincount']; $this->maxTags = $params['maxtags']; $this->minTagSize = $params['minsize']; $this->maxSize = $params['maxsize']; }
/** * @see SMWResultPrinter::handleParameters * * @since 1.6 * * @param array $params * @param $outputmode */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->mSep = str_replace('_', ' ', $params['sep']); // allow "_" for encoding spaces, as documented $this->mTemplate = trim($params['template']); $this->mNamedArgs = $params['named args']; $this->mUserParam = trim($params['userparam']); $this->mColumns = !$this->isPlainlist() ? $params['columns'] : 1; $this->mIntroTemplate = $params['introtemplate']; $this->mOutroTemplate = $params['outrotemplate']; }
protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->mTemplate = trim($params['template']); $this->mUserParam = trim($params['userparam']); if ($params['lang'] !== false) { global $wgLang; // Store the actual user's language, so we can revert // back to it after printing the calendar. $this->mRealUserLang = clone $wgLang; $wgLang = Language::factory(trim($params['lang'])); } $this->setColors($params['colors']); }
protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); // // Set in SMWResultPrinter: // $this->mIntro = $params['intro']; // $this->mOutro = $params['outro']; // $this->mSearchlabel = $params['searchlabel'] === false ? null : $params['searchlabel']; // $this->mLinkFirst = true | false; // $this->mLinkOthers = true | false; // $this->mDefault = str_replace( '_', ' ', $params['default'] ); // $this->mShowHeaders = SMW_HEADERS_HIDE | SMW_HEADERS_PLAIN | SMW_HEADERS_SHOW; $this->mSearchlabel = null; $this->mParams = $params; $this->mViews = array_map('trim', explode(',', $params['views'])); }
/** * (non-PHPdoc) * @see SMWResultPrinter::handleParameters() */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->m_graphName = trim($params['graphname']); $this->m_graphSize = trim($params['graphsize']); $this->m_graphLegend = $params['graphlegend']; $this->m_graphLabel = $params['graphlabel']; $this->m_rankdir = strtoupper(trim($params['arrowdirection'])); $this->m_graphLink = $params['graphlink']; $this->m_graphColor = $params['graphcolor']; $this->m_nameProperty = $params['nameproperty'] === false ? false : trim($params['nameproperty']); $this->m_parentRelation = strtolower(trim($params['relation'])) == 'parent'; $this->m_nodeShape = $params['nodeshape']; $this->m_wordWrapLimit = $params['wordwraplimit']; }
protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->mTemplate = trim($params['template']); $this->mUserParam = trim($params['userparam']); // startmonth is initialized with current month by default $this->mStartMonth = trim($params['startmonth']); // startyear is initialized with current year by default $this->mStartYear = trim($params['startyear']); if ($params['lang'] !== false) { global $wgLang; // Store the actual user's language, so we can revert // back to it after printing the calendar. $this->mRealUserLang = clone $wgLang; $wgLang = Language::factory(trim($params['lang'])); } $this->setColors($params['colors']); }
protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); if (array_key_exists('graphname', $params)) { $this->m_graphName = trim($params['graphname']); } $this->m_graphNodeType = $params['graphnodetype']; // if ( array_key_exists( 'graphnodetype', $params ) ) { // $userType = strtolower( trim( $params['graphnodetype'] ) ); // if ( in_array($userType, $this->m_nodeTypes) ) { // $this->m_graphNodeType = $userType; // } // // } if (array_key_exists('graphnodesize', $params)) { $userSize = intval(trim($params['graphnodesize'])); if ($userSize > 0) { $this->m_graphNodeSize = $userSize; } } if (array_key_exists('graphsize', $params)) { $this->m_graphSize = trim($params['graphsize']); } if (array_key_exists('graphrootnode', $params)) { if (strtolower(trim($params['graphrootnode'])) == 'yes') { $this->m_graphRootNode = true; } } if (array_key_exists('graphlegend', $params)) { if (strtolower(trim($params['graphlegend'])) == 'yes') { $this->m_graphLegend = true; } } if (array_key_exists('graphlabel', $params)) { if (strtolower(trim($params['graphlabel'])) == 'yes') { $this->m_graphLabel = true; } } if (array_key_exists('graphnodecolor', $params)) { $userNodeColor = strtolower(trim($params['graphnodecolor'])); if (array_key_exists($userNodeColor, $this->m_nodeColorArray)) { $this->m_graphNodeColor = $this->m_nodeColorArray[$userNodeColor]; $this->debug_out .= "graphNodeColor: " . $this->m_graphNodeColor . " | "; } } if (array_key_exists('rootnodecolor', $params)) { $userRootNodeColor = strtolower(trim($params['rootnodecolor'])); if (array_key_exists($userRootNodeColor, $this->m_nodeColorArray)) { $this->m_rootNodeColor = $this->m_nodeColorArray[$userRootNodeColor]; } } if (array_key_exists('graphlink', $params)) { if (strtolower(trim($params['graphlink'])) == 'yes') { $this->m_graphLink = true; } } if (array_key_exists('graphcolor', $params)) { if (strtolower(trim($params['graphcolor'])) == 'yes') { $this->m_graphColor = true; } } }
protected function handleParameters( array $params, $outputmode ) { parent::handleParameters( $params, $outputmode ); $this->m_title = trim( $params['title'] ); $this->m_description = trim( $params['description'] ); }
/** * @see SMWResultPrinter::handleParameters * * @since 1.7 * * @param array $params * @param $outputmode */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->m_sep = str_replace('_', ' ', $params['sep']); }
protected function handleParameters( array $params, $outputmode ) { parent::handleParameters( $params, $outputmode ); $this->mOutlineProperties = $params['outlineproperties']; }
protected function handleParameters(array $params, $outputmode) { // does the link parameter: parent::handleParameters($params, $outputmode); //separators: $this->mSep = $params['sep']; $this->mPropSep = $params['propsep']; $this->mManySep = $params['manysep']; $this->mRecordSep = $params['recordsep']; $this->mHeaderSep = $params['headersep']; // only use this in inline mode, if text is given. Since SMW 1.6.2 '' is given, so if // we wouldn't check, we would always end up with an array instead of visible output if ($params['name'] !== false && ($this->mInline || trim($params['name']) !== '')) { $this->mArrayName = trim($params['name']); $this->createArray(array()); //create empty array in case we get no result so we won't have an undefined array in the end. } // if mainlabel set to '-', this will cause the titles not to appear, so make sure we catch this! $this->mMainLabelHack = trim($params['mainlabel']) === '-'; // whether or not to display the page title: $this->mShowPageTitles = strtolower($params['titles']) != 'hide'; switch (strtolower($params['hidegaps'])) { case 'none': $this->mHideRecordGaps = false; $this->mHidePropertyGaps = false; break; case 'all': $this->mHideRecordGaps = true; $this->mHidePropertyGaps = true; break; case 'property': case 'prop': case 'attribute': case 'attr': $this->mHideRecordGaps = false; $this->mHidePropertyGaps = true; break; case 'record': case 'rec': case 'rcrd': case 'n-ary': case 'nary': $this->mHideRecordGaps = true; $this->mHidePropertyGaps = false; break; } }
/** * (non-PHPdoc) * @see SMWResultPrinter::handleParameters() */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->m_width = $this->m_params['width']; $this->m_height = $this->m_params['height']; }
/** * @see SMWResultPrinter::handleParameters * * @since 1.7 * * @param array $params * @param $outputmode */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->m_showhead = !$params['embedonly']; $this->m_embedformat = $params['embedformat']; }
/** * @see SMWResultPrinter::handleParameters * * @since 1.7 * * @param array $params * @param $outputmode */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->syntax = $params['syntax']; }
protected function handleParameters(array $params, $outputmode) { //Existence of these array keys is not checked in SMW_QueryPrinter.php //If they are not specified, they should default to the values given //They are, however, not of interest to this specific QueryPrinter if (!array_key_exists('headers', $params)) { $params['headers'] = 'hide'; } if (!array_key_exists('link', $params)) { $params['link'] = 'none'; } parent::handleParameters($params, $outputmode); $this->paramWidth = $params['width']; }
/** * @see SMWResultPrinter::handleParameters * * @since 1.6 * * @param array $params * @param $outputmode */ protected function handleParameters(array $params, $outputmode) { parent::handleParameters($params, $outputmode); $this->mHTMLClass = $params['class']; }