本文整理汇总了PHP中sfSympalConfig::getDeep方法的典型用法代码示例。如果您正苦于以下问题:PHP sfSympalConfig::getDeep方法的具体用法?PHP sfSympalConfig::getDeep怎么用?PHP sfSympalConfig::getDeep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfSympalConfig
的用法示例。
在下文中一共展示了sfSympalConfig::getDeep方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContentTemplates
/**
* Get array of configured content templates for a given moel name
*
* @param string $model
* @return array $contentTemplates
*/
public function getContentTemplates($model)
{
return sfSympalConfig::getDeep('content_types', $model, 'content_templates', array());
}
示例2: _configure
/**
* Takes in the raw array of options, parses those options, and combines
* them with global options
*
* @param mixed $slot The name of the slot or the slot itself
* @param array $options
*/
protected function _configure($slot, $content, $options)
{
$this->setContent($content);
$this->_options = $options;
// determine the name of the slot
$name = $slot instanceof sfSympalContentSlot ? $slot->name : $slot;
/*
* Priority of options is as follows (most important to least important)
* 1) Any option passed in from the template
* 2) Any option defined on the content type
* 3) Any option defined on the slot type
*/
// merge in options for this slot that may appear under this content type
$contentTypeSlotOptions = sfSympalConfig::getDeep('content_types', $this->_content->Type->name, 'content_slots', array());
if (isset($contentTypeSlotOptions[$name])) {
$this->_options = array_merge($contentTypeSlotOptions[$name], $this->_options);
}
// Gets or creates the slot
$this->_configureSlot($slot);
// Merge in the #3 from the above priority list
$slotOptions = sfSympalConfig::get('content_slot_types', $this->_slot->type, array());
$this->_options = array_merge($slotOptions, $this->_options);
}