/** * compress * * @return void */ public function compress() { // Get assets list from Document $list = $this->getStorage(); $list = ArrayHelper::getColumn($list, 'url'); // Build assets hash per page. $name = $this->buildHash($list); // Cache file path. $path = $this->getCachePath($name); $assetPath = WINDWALKER_PUBLIC . '/' . $this->asset->getAssetFolder() . '/' . $path; // Prepare to minify and combine files. if (!is_file($assetPath)) { // Combine data by file list. $data = $this->combineData($list); $data = $this->doCompress($data); File::write($assetPath, $data); } $this->addAsset($path); }
/** * Method to test getTree(). * * @return void * * @covers Windwalker\Record\NestedRecord::getTree */ public function testGetTree() { $tree = $this->instance->getTree(1); $ids = array(1, 6, 2, 4, 3, 5, 7); $this->assertEquals($ids, ArrayHelper::getColumn($tree, 'id')); }
/** * Test pulling data from a single column (by index or association). * * @param array $input Input array * @param mixed $index Column to pull, either by association or number * @param array $expect The expected results * @param string $message The failure message * * @return void * * @dataProvider seedTestGetColumn * @covers Windwalker\Utilities\ArrayHelper::getColumn * @since 1.0 */ public function testGetColumn($input, $index, $expect, $message) { $this->assertEquals($expect, ArrayHelper::getColumn($input, $index), $message); }
/** * dump * * @return void */ public static function dump() { $list = static::getList(); $ids = ArrayHelper::getColumn($list, 'id'); $content = implode(',', $ids); File::write(static::getTempPath(), $content); }
{{-- Part of Front project. --}} <?php $socialLogin = (array) $app->get('social_login'); $socialLogin = \Windwalker\Utilities\ArrayHelper::getColumn($socialLogin, 'enabled'); $socialLogin = in_array(true, $socialLogin); ?> @extends($warderExtends) @section('content') <style> #social-login-buttons { text-align: center; } #social-login-buttons button.btn { width: 300px; } </style> <div class="container warder-page login-page"> <div class="row"> @section('login-content') <form id="user-form" class="form-horizontal" action="{{ $router->html('login') }}" method="POST" enctype="multipart/form-data"> <div class="col-md-12" style="margin-top: 50px"> @yield('login-desc') <div class="row"> <div class="col-md-6 {{ $socialLogin ? null : 'col-md-offset-3' }} login-form-wrapper"> {!! $form->renderFields() !!}