本文整理匯總了PHP中Dropdowns::getSocialSubtypes方法的典型用法代碼示例。如果您正苦於以下問題:PHP Dropdowns::getSocialSubtypes方法的具體用法?PHP Dropdowns::getSocialSubtypes怎麽用?PHP Dropdowns::getSocialSubtypes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Dropdowns
的用法示例。
在下文中一共展示了Dropdowns::getSocialSubtypes方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array_keys
?>
' value='' />-->
<textarea type='text' name='name' id='feed-post-editor'
placeholder='<?php
echo Yii::t('app', 'Enter text here...');
?>
'></textarea>
<fieldset data-role='controlgroup' data-type='horizontal'>
<?php
$userIds = array_keys($users);
$firstUser = $userIds[0];
echo CHtml::dropDownList('associationId', $firstUser, $users, array('data-mini' => 'true', 'id' => 'feed-post-association-id'));
echo CHtml::dropDownList('visibility', 1, array(1 => Yii::t('actions', 'Public'), 0 => Yii::t('actions', 'Private')), array('data-mini' => 'true', 'id' => 'feed-post-visibility'));
echo CHtml::dropDownList('subtype', 1, array_map(function ($item) {
return Yii::t('app', $item);
}, Dropdowns::getSocialSubtypes()), array('data-mini' => 'true', 'id' => 'feed-post-subtype'));
?>
</fieldset>
<button type='submit' class='x2-button' id='feed-post-button'
data-inline='true'><?php
echo Yii::t('app', 'Submit Post');
?>
</button>
<?php
echo X2Html::csrfToken();
?>
</form>
<div id="attachments" style='display: none;'>
<?php
$this->widget('Attachments', array('associationType' => 'feed', 'associationId' => Yii::app()->user->getId(), 'mobile' => true));
?>
示例2: array
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* X2Engine" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by X2Engine".
*****************************************************************************************/
Yii::app()->clientScript->registerCss('filterControlsCss', "\n\n#filter-controls > .portlet-content {\n padding: 5px 0px !important;\n}\n\n#filter-controls > .portlet-content > .x2-button-group {\n text-align: center;\n margin-bottom: 5px;\n}\n\n#sidebar-full-controls-button-container {\n text-align:center;\n}\n#sidebar-full-controls-button-container > .toggle-filters-link {\n margin-bottom: 4px;\n}\n\n");
if (isset($_SESSION['filters'])) {
$filters = $_SESSION['filters'];
} else {
$filters = array('visibility' => array(), 'users' => array(), 'types' => array(), 'subtypes' => array());
}
$visibility = array('1' => 'Public', '0' => 'Private');
$socialSubtypes = Dropdowns::getSocialSubtypes();
$users = User::getNames();
$eventTypeList = Yii::app()->db->createCommand()->select('type')->from('x2_events')->group('type')->queryAll();
$eventTypes = array();
foreach ($eventTypeList as $key => $value) {
if ($value['type'] != 'comment') {
$eventTypes[$value['type']] = Events::parseType($value['type']);
}
}
$profile = Yii::app()->params->profile;
$this->beginWidget('LeftWidget', array('widgetLabel' => Yii::t('app', 'Filter Controls'), 'widgetName' => 'FilterControls', 'id' => 'filter-controls'));
echo '<div class="x2-button-group">';
echo '<a href="#" class="simple-filters x2-button' . ($profile->fullFeedControls ? "" : " disabled-link") . '" style="width:42px">' . Yii::t('app', 'Simple') . '</a>';
echo '<a href="#" class="full-filters x2-button x2-last-child' . ($profile->fullFeedControls ? " disabled-link" : "") . '" style="width:42px">' . Yii::t('app', 'Full') . '</a>';
echo "</div>\n";
$filterList = json_decode($profile->feedFilters, true);
示例3: getViewFileParams
public function getViewFileParams()
{
if (!isset($this->_viewFileParams)) {
$this->_viewFileParams = array_merge(parent::getViewFileParams(), array('userNames' => User::getNames(), 'socialSubtypes' => Dropdowns::getSocialSubtypes(), 'visibilityFilters' => array('1' => 'Public', '0' => 'Private'), 'chartSettingsDataProvider' => self::getChartSettingsProvider($this->chartType), 'suppressChartSettings' => false, 'metricTypes' => array('any' => Yii::t('app', 'All Events'), 'notif' => Yii::t('app', 'Notifications'), 'feed' => Yii::t('app', 'Feed Events'), 'comment' => Yii::t('app', 'Comments'), 'record_create' => Yii::t('app', 'Records Created'), 'record_deleted' => Yii::t('app', 'Records Deleted'), 'weblead_create' => Yii::t('app', 'Webleads Created'), 'workflow_start' => Yii::t('app', '{Process} Started', array('{Process}' => Modules::displayName(false, 'Workflow'))), 'workflow_complete' => Yii::t('app', '{Process} Complete', array('{Process}' => Modules::displayName(false, 'Workflow'))), 'workflow_revert' => Yii::t('app', '{Process} Reverted', array('{Process}' => Modules::displayName(false, 'Workflow'))), 'email_sent' => Yii::t('app', 'Emails Sent'), 'email_opened' => Yii::t('app', 'Emails Opened'), 'web_activity' => Yii::t('app', 'Web Activity'), 'case_escalated' => Yii::t('app', 'Cases Escalated'), 'calendar_event' => Yii::t('app', '{Calendar} Events', array('{Calendar}' => Modules::displayName(false, 'Calendar'))), 'action_reminder' => Yii::t('app', '{Action} Reminders', array('{Action}' => Modules::displayName(false, 'Actions'))), 'action_complete' => Yii::t('app', '{Actions} Completed', array('{Actions}' => Modules::displayName(true, 'Actions'))), 'doc_update' => Yii::t('app', 'Doc Updates'), 'email_from' => Yii::t('app', 'Email Received'), 'voip_calls' => Yii::t('app', 'VOIP Calls'), 'media' => Yii::t('app', '{Media}', array('{Media}' => Modules::displayName(true, 'Media')))), 'chartType' => 'eventsChart', 'widgetUID' => $this->widgetUID));
}
return $this->_viewFileParams;
}
示例4: getViewFileParams
/**
* Send the chart type to the widget content view
*/
public function getViewFileParams()
{
if (!isset($this->_viewFileParams)) {
$this->_viewFileParams = array_merge(parent::getViewFileParams(), array('chartType' => $this->chartType, 'chartSettingsDataProvider' => self::getChartSettingsProvider($this->chartType), 'eventTypes' => array('all' => Yii::t('app', 'All Events')) + Events::$eventLabels, 'socialSubtypes' => Dropdowns::getSocialSubtypes(), 'visibilityFilters' => array('1' => 'Public', '0' => 'Private'), 'suppressChartSettings' => false, 'chartType' => 'usersChart', 'widgetUID' => $this->widgetUID, 'metricTypes' => User::getUserOptions()));
}
return $this->_viewFileParams;
}
示例5: array
?>
<?php
$form = $this->beginWidget('CActiveForm', array('id' => 'feed-form', 'enableAjaxValidation' => false, 'method' => 'post'));
?>
<div class="float-row" style='overflow:visible;'>
<?php
echo $form->textArea($feed, 'text', array('style' => 'width:99%;height:25px;color:#aaa;display:block;clear:both;'));
echo "<div id='post-buttons' style='display:none;'>";
echo $form->dropDownList($feed, 'associationId', $users, array('style' => $isMyProfile ? '' : 'display:none;', 'class' => 'x2-select'));
$feed->visibility = 1;
echo $form->dropDownList($feed, 'visibility', array(1 => Yii::t('actions', 'Public'), 0 => Yii::t('actions', 'Private')), array('class' => 'x2-select'));
function translateOptions($item)
{
return Yii::t('app', $item);
}
echo $form->dropDownList($feed, 'subtype', array_map('translateOptions', Dropdowns::getSocialSubtypes()), array('class' => 'x2-select'));
?>
<div id='second-row-buttons-container'>
<?php
echo CHtml::submitButton(Yii::t('app', 'Post'), array('class' => 'x2-button', 'id' => 'save-button'));
if ($isMyProfile) {
echo CHtml::button(Yii::t('app', 'Attach A File/Photo'), array('class' => 'x2-button', 'onclick' => "x2.FileUploader.toggle('activity')", 'id' => "toggle-attachment-menu-button"));
}
?>
</div>
</div>
<?php
?>
</div>
<?php
$this->endWidget();