コード例 #1
0
 function getGroupNamingService()
 {
     $helper = new ConfigHelper();
     $customConfigObj = !is_null($this->configuration) ? $helper->newCustomConfig($this->configuration) : null;
     $obj = $helper->newInstanceOf($this->className, array($customConfigObj), 'OCA\\User_Servervars2\\Service\\Impl\\PrependGroupNamingService');
     return $obj;
 }
コード例 #2
0
 public function getTokens()
 {
     $helper = new ConfigHelper();
     $config = $helper->newCustomConfig($this->customConfig);
     return $helper->newInstanceOf($this->className, array($config), '\\OCA\\User_Servervars2\\Service\\Impl\\MuteTokens');
 }
コード例 #3
0
ファイル: admin.php プロジェクト: jeanaimar2/user_servervars2
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
/**
* This PHP scripts is used by AppInfo\App to register an admin panel.
* It sets a bunch of var and calls a template.
* 
*/
use OCA\User_servervars2\Lib\ConfigHelper;
$appName = 'user_servervars2';
$helper = new ConfigHelper();
$tmpl = new OCP\Template($appName, 'settings-admin');
$array = array('sso_url', 'slo_url', 'auto_create_user', 'update_user_data', 'update_groups', 'stop_if_empty', 'tokens_class', 'tokens_conf', 'group_naming_conf', 'group_naming_class', 'button_name');
foreach ($array as $key) {
    $parm = OCP\Config::getAppValue($appName, $key);
    $tmpl->assign($key, $parm);
    if ($helper->endsWith($key, 'conf') && $parm) {
        $tmpl->assign($key . '_data', $helper->getJSon($parm));
    }
}
return $tmpl->fetchPage();
コード例 #4
0
 /**
  * @Ajax
  */
 public function conf()
 {
     \OC_Util::checkAdminUser();
     $params = $this->request->post;
     $helper = new ConfigHelper();
     return new JSONResponse($helper->getJSon($params['file']));
 }